semPower.postHoc: semPower.postHoc

Description Usage Arguments Value Examples

View source: R/postHoc.R

Description

Determine power (1-beta) given alpha, df, and effect

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
semPower.postHoc(
  effect = NULL,
  effect.measure = NULL,
  alpha,
  N,
  df,
  p = NULL,
  SigmaHat = NULL,
  Sigma = NULL
)

Arguments

effect

effect size specifying the discrepancy between H0 and H1 (a list for multiple group models)

effect.measure

type of effect, one of "F0", "RMSEA", "Mc", "GFI", AGFI"

alpha

alpha error

N

the number of observations (a list for multiple group models)

df

the model degrees of freedom

p

the number of observed variables, required for effect.measure = "GFI" and "AGFI"

SigmaHat

model implied covariance matrix (a list for multiple group models). Use in conjuntion with Sigma to define effect and effect.measure.

Sigma

population covariance matrix (a list for multiple group models). Use in conjuntion with SigmaHat to define effect and effect.measure.

Value

list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
power <- semPower.postHoc(effect = .05, effect.measure = "RMSEA", alpha = .05, N = 250, df = 200)
summary(power)
power <- semPower.postHoc(effect = list(.02, .01), effect.measure = "F0", 
                          alpha = .05, N = list(250, 350), df = 200)
summary(power)
power <- semPower.postHoc(N = 1000, df = 5, alpha = .05,  
                          SigmaHat = diag(4), Sigma = cov(matrix(rnorm(4*1000),  ncol=4)))
summary(power)

## End(Not run)

semPower documentation built on Nov. 2, 2021, 1:06 a.m.