summaryFit: Provide summary of model fit across replications

Description Usage Arguments Value Author(s) See Also Examples

View source: R/summarySimResult.R

Description

This function will provide fit index cutoffs for values of alpha, and mean fit index values across all replications.

Usage

1
summaryFit(object, alpha = NULL, improper = TRUE, usedFit = NULL)

Arguments

object

SimResult to be summarized

alpha

The alpha level used to find the fit indices cutoff. If there is no varying condition, a vector of different alpha levels can be provided.

improper

If TRUE, include the replications that provided improper solutions

usedFit

Vector of names of fit indices that researchers wish to summarize.

Value

A data frame that provides fit statistics cutoffs and means

When linkS4class{SimResult} has fixed simulation parameters the first colmns are fit index cutoffs for values of alpha and the last column is the mean fit across all replications. Rows are

When linkS4class{SimResult} has random simulation parameters (sample size or percent missing), columns are the fit indices listed above and rows are values of the random parameter.

Author(s)

Alexander M. Schoemann (East Carolina University; schoemanna@ecu.edu) Sunthud Pornprasertmanit (psunthud@gmail.com)

See Also

SimResult for the result object input

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
loading <- matrix(0, 6, 1)
loading[1:6, 1] <- NA
LY <- bind(loading, 0.7)
RPS <- binds(diag(1))
RTE <- binds(diag(6))
CFA.Model <- model(LY = LY, RPS = RPS, RTE = RTE, modelType="CFA")

# We make the examples running only 5 replications to save time.
# In reality, more replications are needed.
Output <- sim(5, n=500, CFA.Model)

# Summarize the sample fit indices
summaryFit(Output)

simsem documentation built on March 29, 2021, 1:07 a.m.

Related to summaryFit in simsem...