CFA: CFA Fit of 'EGA' Structure

Description Usage Arguments Value Author(s) See Also Examples

View source: R/CFA.R

Description

Verifies the fit of the structure suggested by EGA using confirmatory factor analysis

Usage

1
CFA(ega.obj, data, estimator, plot.CFA = TRUE, layout = "spring", ...)

Arguments

ega.obj

An EGA object

data

A dataframe with the variables to be used in the analysis

estimator

The estimator used in the confirmatory factor analysis. 'WLSMV' is the estimator of choice for ordinal variables. 'ML' or 'WLS' for interval variables. See lavOptions for more details

plot.CFA

Logical. Should the CFA structure with its standardized loadings be plot? Defaults to TRUE

layout

Layout of plot (see semPaths). Defaults to "spring"

...

Arguments passed to cfa

Value

Returns a list containing:

fit

Output from cfa

summary

Summary output from lavaan-class

fit.measures

Fit measures: chi-squared, degrees of freedom, p-value, CFI, RMSEA, GFI, and NFI. Additional fit measures can be applied using the fitMeasures function (see examples)

Author(s)

Hudson F. Golino <hfg9s at virginia.edu>

See Also

EGA to estimate the number of dimensions of an instrument using EGA and bootEGA to investigate the stability of EGA's estimation via bootstrap.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Load data
wmt <- wmt2[,7:24]

## Not run: 
# Estimate EGA
ega.wmt <- EGA(data = wmt)


## End(Not run)

# Fit CFA model to EGA results
cfa.wmt <- CFA(ega.obj = ega.wmt, estimator = 'WLSMV', plot.CFA = TRUE, data = wmt)

# Additional fit measures
lavaan::fitMeasures(cfa.wmt$fit, fit.measures = "all")

# Load data
intel <- intelligenceBattery[,8:66]

## Not run: 
# Estimate EGA
ega.intel <- EGA(data = intel)

# Fit CFA model to EGA results
cfa.intel <- CFA(ega.obj = ega.intel, estimator = 'WLSMV', plot.CFA = TRUE,
data = intel)


## End(Not run)

hfgolino/EGA documentation built on Aug. 16, 2019, 2:50 a.m.