threeganova.sim: threeganova.sim

Description Usage Arguments Value Examples

View source: R/threeganova.sim.R

Description

simulate three-group anova data

Usage

1
threeganova.sim(group_n, f_sqr, sd.1)

Arguments

group_n

a (non-empty) numeric value of desired sample size per group

f_sqr

a (non-empty) numeric value of desired Cohen's f squared value

sd.1

a (non-empty) numeric value of desired standard deviation ratio

Value

a dataframe containing scores "y", grouping factor "group", and residual errors.

Examples

1
2
3
4
sample.3g=threeganova.sim(1000,.16,5) #data of n=1000, sd1=sd3=1 and sd2=5, and f^2=.16
colnames(sample.3g) #examine the column names
dim(sample.3g) #examine the data structure
aggregate(sample.3g$y,sd,by=list(sample.3g$group)) #check group standard deviations

QMmmmLiu/DACFD documentation built on Feb. 8, 2018, 12:12 p.m.