gf_point(Score ~ Condition, data=df)
| Group | Outcome | Score_shuf |
|---|
Initial b1 (group difference) = —
Shuffle 1
Model
Shuffle 2
Dist of b1
Graphing Shuffles
df$Score_shuf <- shuffle(df$Score)
gf_point(Score_shuf ~ Condition, data=df)
A Two-Group Model: Yi = b0 + b1Xi + ei
▶
Graph the data
▶
Fit the model
Yi = b0 + b1Xi + ei
lm(outcome ~ group, data=df)
▶
Generate b1
b1(outcome ~ group, data=df)
Simulating a World Where β1 is 0
▶
Graph shuffles
df$Score_shuf <- shuffle(df$Score)
gf_point(Score_shuf ~ Condition, data=df)
▶
Model shuffles
df$Score_shuf <- shuffle(df$Score)
b1(Score_shuf~Condition, data=df)
A Sampling Distribution of b1 Assuming β1=0
df$Score_shuf <- shuffle(df$Score)
b1(Score_shuf~Condition, data=df)
Sampling Distribution of b1