semPower.compromise: semPower.compromise

View source: R/compromise.R

semPower.compromiseR Documentation

semPower.compromise

Description

Performs a compromise power analysis, i. e., determines the critical chi-square along with the implied alpha error and beta error , given the alpha/beta ratio, a measure of effect, N, and df

Usage

semPower.compromise(
  effect = NULL,
  effect.measure = NULL,
  abratio = 1,
  N,
  df = NULL,
  p = NULL,
  SigmaHat = NULL,
  Sigma = NULL,
  muHat = NULL,
  mu = NULL,
  fittingFunction = "ML",
  ...
)

Arguments

effect

effect size specifying the discrepancy between the null hypothesis (H0) and the alternative hypothesis (H1). A list for multiple group models; a vector of length 2 for effect-size differences. Can be NULL if Sigma and SigmaHat are set.

effect.measure

type of effect, one of "F0", "RMSEA", "Mc", "GFI", "AGFI". Can be NULL if Sigma and SigmaHat are set.

abratio

the ratio of alpha to beta

N

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

df

the model degrees of freedom. See semPower.getDf() for a way to obtain the df of a specific model.

p

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

SigmaHat

can be used instead of effect and effect.measure: model implied covariance matrix (a list for multiple group models). Used in conjunction with Sigma to define the effect.

Sigma

can be used instead of effect and effect.measure: population covariance matrix (a list for multiple group models). Used in conjunction with SigmaHat to define effect.

muHat

can be used instead of effect and effect.measure: model implied mean vector. Used in conjunction with mu. If NULL, no meanstructure is involved.

mu

can be used instead of effect and effect.measure: observed (or population) mean vector. Use in conjunction with muHat. If NULL, no meanstructure is involved.

fittingFunction

one of 'ML' (default), 'WLS', 'DWLS', 'ULS'. Defines the discrepancy function used to obtain Fmin.

...

other parameters related to plots, notably plotShow, plotShowLabels, and plotLinewidth.

Value

Returns a list. Use summary() to obtain formatted results.

See Also

semPower.aPriori() semPower.postHoc()

Examples

## Not run: 

# determine the critical value such that alpha = beta when distinguishing a model
# involving 200 df exhibiting an RMSEA >= .08 from a perfectly fitting model.  
cp <- semPower.compromise(effect = .08, effect.measure = "RMSEA", 
                          abratio = 1, N = 250, df = 200)
summary(cp)


## End(Not run)

semPower documentation built on Sept. 30, 2024, 9:24 a.m.