Learn R Programming

rpsychi (version 0.3)

ind.oneway.second: A one-way design with independent samples using published work

Description

ind.oneway.second conducts a one-way design with independent samples, namely one-way randomized-group analysis of variance, using published work.

Usage

ind.oneway.second(m, sd, n, 
            unbiased = TRUE, contr = NULL, sig.level = 0.05, digits = 3)

Arguments

m
a numeric vector contains the means (length(m) >= 2)
sd
a numeric vector contains the sample/unbiased standard deviations (length(sd) >= 2)
n
a numeric contains the sample size (length(n) >= 2)
unbiased
sd contains unbiased standard deviations (unbiased = TRUE, default) or sample standard deviations (unbiased = FALSE)
contr
a matrix or vector contains the contrast weights
sig.level
a numeric contains the significance level (default 0.05)
digits
the specified number of decimal places (default 3)

Value

  • The returned object of ind.oneway.second contains the following components:
  • anova.tablereturns a ANOVA table containing sums of squares, degrees of freedom, mean squares, $F$ values
  • omnibus.esreturns a omnibus effect size which is a $\eta^2$, and its' confidence interval
  • raw.contrastsreturns raw mean differences, their confidence intervals, and standard errors
  • standardized.contrastsreturns standardized mean differences for the contrasts (Hedges's $g$), their approximate confidence intervals for population standardized mean differences, and standard errors
  • powerreturns statistical power for detecting small ($\eta^2 = 0.01$), medium ($\eta^2 = 0.06$), and large ($\eta^2 = 0.14$) population effect sizes

encoding

UTF-8

Details

This function conducts a one-way design with independent samples, namely one-way randomized-group analysis of variance, using published work. If you do not specify contr, all possible pairwise contrasts will be calculated. Statistical power is calculated using the following specifications: (a) small ($\eta^2 = 0.01$), medium ($\eta^2 = 0.06$), and large ($\eta^2 = 0.14$) population effect sizes, according to the interpretive guideline for effect sizes by Cohen (1992) (b) sample size specified by n (c) significance level specified by sig.level

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.oneway, samplesize.etasq

Examples

Run this code
##Kline (2004) Table 6.3
dat <- data.frame(y = c(9,12,13,15,16,
                       8,12,11,10,14,
                       10,11,13,11,15),
                  x =  rep(factor(c("a","b","c")), each=5)
                  )                 

##contrast 1: a - c, contrast 2: 1/2(a + c) - b
my.cont <- matrix(c(1,0,-1,1/2,-1,1/2), ncol=3, nrow=2, byrow=TRUE)


ind.oneway.second(m = tapply(dat$y, dat$x, mean),
                  sd = tapply(dat$y, dat$x, sd),
                  n= tapply(dat$y, dat$x, length)) 

ind.oneway.second(m = tapply(dat$y, dat$x, mean),
                  sd = tapply(dat$y, dat$x, sd),
                  n= tapply(dat$y, dat$x, length),
                  contr = my.cont)

Run the code above in your browser using DataLab