demo_nhst: Demonstration of 2-sample inference

Description Usage Arguments Value Examples

View source: R/demo_nhst_source.r

Description

Demonstration on judging the difference between two independent samples, as presented in class. As shown in class, one part of the demonstration asks you to judge the difference between the means for two treatment groups. The second part of the demonstration illustrates the results we obtain when the data are randomly shuffled over the two groups. Note: On some platforms, the plot region may need to be initialized before running the app. This can be done with: plot(1)

Usage

1
2
3
4
5
6
7
demo_nhst(
  demo.type = 1,
  nreps = 100,
  sleep.sec = 0.2,
  add.diff = 3.75,
  show.ttest = F
)

Arguments

demo.type

a number (1=show actual groups 2=run random shuffling)

nreps

a number (10-100) that controls number of replications

sleep.sec

a number (0-3) that controls waiting between replications

add.diff

number specifying the mean difference the two groups

show.ttest

controls whether results of 2-sample t test is displayed.

Value

None

Examples

1
2
3
4
5
## Not run: 
demo_nhst(demo.type=1) #shows actual observations for 2 groups
demo_nhst(demo.type=2) #shows simulation of random shuffling

## End(Not run)

CLPS0900/CLPS0900R documentation built on March 16, 2020, 4:55 a.m.