Understanding R's shuffle() Function

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
Generate b1
Simulating a World Where β1 is 0
Graph shuffles
Model shuffles
A Sampling Distribution of b1 Assuming β1=0
df$Score_shuf <- shuffle(df$Score) b1(Score_shuf~Condition, data=df)
Sampling Distribution of b1
0 shuffles
Original difference Shuffles Most recent
Mean of Sampling Distribution