Find fit indices cutoff for nested model comparison given a priori alpha level
Extract fit indices information from the simulation of parent and nested models and getCutoff of fit indices given a priori alpha level
getCutoffNested(nested, parent, alpha = 0.05, usedFit = NULL, nVal = NULL, pmMCARval = NULL, pmMARval = NULL, df = 0)
nested |
|
parent |
|
alpha |
A priori alpha level |
usedFit |
Vector of names of fit indices that researchers wish to getCutoffs from. The default is to getCutoffs of all fit indices. |
nVal |
The sample size value that researchers wish to find the fit indices cutoffs from. |
pmMCARval |
The percent missing completely at random value that researchers wish to find the fit indices cutoffs from. |
pmMARval |
The percent missing at random value that researchers wish to find the fit indices cutoffs from. |
df |
The degree of freedom used in spline method in predicting the fit indices by the predictors. If |
One-tailed cutoffs of several fit indices with a priori alpha level
Sunthud Pornprasertmanit (psunthud@gmail.com)
## Not run: # Nested Model loading.null <- matrix(0, 6, 1) loading.null[1:6, 1] <- NA LY.NULL <- bind(loading.null, 0.7) RPS.NULL <- binds(diag(1)) error.cor.mis <- matrix("rnorm(1, 0, 0.1)", 6, 6) diag(error.cor.mis) <- 1 RTE <- binds(diag(6), misspec=error.cor.mis) CFA.Model.NULL <- model(LY = LY.NULL, RPS = RPS.NULL, RTE = RTE, modelType="CFA") # Parent Model loading.alt <- matrix(0, 6, 2) loading.alt[1:3, 1] <- NA loading.alt[4:6, 2] <- NA LY.ALT <- bind(loading.alt, 0.7) latent.cor.alt <- matrix(NA, 2, 2) diag(latent.cor.alt) <- 1 RPS.ALT <- binds(latent.cor.alt, "runif(1, 0.7, 0.9)") CFA.Model.ALT <- model(LY = LY.ALT, RPS = RPS.ALT, RTE = RTE, modelType="CFA") # The actual number of replications should be greater than 10. Output.NULL.NULL <- sim(10, n=500, model=CFA.Model.NULL, generate=CFA.Model.NULL) Output.NULL.ALT <- sim(10, n=500, model=CFA.Model.ALT, generate=CFA.Model.NULL) # Find the fix index cutoff from the sampling distribution of the difference # in fit index of nested models where the alpha is 0.05. getCutoffNested(Output.NULL.NULL, Output.NULL.ALT, alpha=0.05) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.