ind.twoway: A two-way design with independent samples using individual...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

ind.twoway conducts a two-way design with independent samples, namely two-way randomized-group analysis of variance, using individual data.

Usage

1
ind.twoway(formula, data, sig.level=.05, digits=3)

Arguments

formula

two-sided formula; the left-hand-side of which gives one dependent variable containing a numeric variable, and the right-hand-side of two independent variables containing a factor with two or more levels

data

a data frame contains the variables in the fomrmula

sig.level

a numeric contains the significance level (default 0.05)

digits

the specified number of decimal places (default 3)

Details

This function conducts a two-way design with independent samples, namely two-way randomized-group analysis of variance, using individual data. The main effect of the first independent variable will be shown in "(row)" section, and the main effect of the second one will be shown in "(col)" section. Always the interaction effect of the two independent variables will be calculated. Statistical power is calculated using the following specifications:

(a) small (η^2 = 0.01), medium (η^2 = 0.06), and large (η^2 = 0.14) population effect sizes, according to the interpretive guideline for effect sizes by Cohen (1992)

(b) sample size specified by formula and data

(c) significance level specified by sig.level

Value

The returned object of ind.oneway contains the following components:

anova.table

returns a ANOVA table containing sums of squares, degrees of freedom, mean squares, F values

omnibus.es

returns a omnibus effect sizes which is a partial η^2, and its' confidence interval for each main and interaction effect

power

returns statistical power for detecting small (η^2 = 0.01), medium (η^2 = 0.06), and large (η^2 = 0.14) population effect sizes

Author(s)

Yasuyuki Okumura
Department of Social Psychiatry,
National Institute of Mental Health,
National Center of Neurology and Psychiatry
yokumura@blue.zero.jp

References

Cohen B (2000) Calculating a factorial ANOVA from means and standard deviations. Understanding Statistics, 1, 191-203.

Cohen J (1992) A power primer. Psychological Bulletin, 112, 155-159.

Kline RB (2004) Beyond significance testing: Reforming data analysis methods in behavioral research. Washington: American Psychological Association.

See Also

ind.twoway.second

Examples

1
2
3
4
5
6
7
8
##Kline (2004) Table 7.5
dat <- data.frame(
           y = c(2,3,4,1,3,1,3,4,5,5,6,6,6,7),
           A = factor(c(rep("A1",5), rep("A2", 9))),
           B = factor(c(rep("B1",3), rep("B2",2), rep("B1",2), rep("B2",7)))
           )

ind.twoway(y~A*B, data=dat)

Example output

Loading required package: gtools
$anova.table
                        SS df     MS      F
Between             23.115  3  7.705  6.577
Between (row)        4.479  1  4.479  3.824
Between (col)        4.479  1  4.479  3.824
Between (row * col) 14.157  1 14.157 12.085
Within              11.714 10  1.171       
Total               34.829 13              

$omnibus.es
                    partial.etasq partial.etasq.lower partial.etasq.upper
Between (row)               0.277                0.00               0.577
Between (col)               0.277                0.00               0.577
Between (row * col)         0.547                0.07               0.743

$power
                    small medium large
Between (row)       0.057   0.12 0.242
Between (col)       0.057   0.12 0.242
Between (row * col) 0.057   0.12 0.242

rpsychi documentation built on May 1, 2019, 10:10 p.m.