Learn R Programming

EFA.dimensions (version 0.1.9.2)

PLOT_Invariance: Plots of multiple groups factor analysis invariance statistics

Description

Plots factor loadings, slopes and intercepts, and/or latent variable distributions from multiple groups confirmatory factor analysis (CFA) models and exploratory structural equation models (ESEM)

Usage

PLOT_Invariance(model_object,
                invar_model = 'Scalar',
                plot_types = c('loadings', 'ints_slopes', 'LV_distribs'),
                loadings_std = TRUE, loadings_by_factor = FALSE)

Value

A list containing the following components (if plotted using this function): loadings, estimates, & LV_scores.

Arguments

model_object

A "Factorial_Invariance" function output object, or a lavaan multiple groups cfa output object.

invar_model

The kind of invariance model for the plots when model_object is from the Factorial_Invariance function. The options are: 'Configural', 'Metric', 'Scalar', 'Strict', 'LV_vars', 'LV_covars', and 'LV_means'. (This argument can be ignored when model_object is not from the Factorial_Invariance function.)

plot_types

The desired kind(s) of plots. The possibilities are
(1) 'loadings', for factor loadings,
(2) 'ints_slopes', for intercepts and slopes, and/or
(3) 'LV_distribs', for latent variable distributions.

loadings_std

Should standardized loadings be used for 'loadings' plots? TRUE or FALSE

loadings_by_factor

For 'loadings' plots, should a separate plot be produced for each factor (TRUE)? If FALSE, then the loadings for different factors will appear in the same plots.

Author

Brian P. O'Connor

Examples

Run this code
RSE_output <-
Factorial_Invariance(data = data_RSE_sex, group = 'gender', 
                     LV_keys = c(1, 1, 2, 1, 2, 1, 1, 2, 2, 2), 
                     LV_names = c('pos', 'neg'))

PLOT_Invariance(model_object = RSE_output, 
                invar_model = 'Configural',
                plot_types = c('loadings', 'ints_slopes'),
                loadings_std = TRUE, loadings_by_factor = TRUE) 
# \donttest{
HS_1939_output <-
  Factorial_Invariance(data = data_HS_1939, group = 'school',
                       LV_keys = c(1,1,1, 2,2,2, 3,3,3),
                       LV_names = c('visual', 'textual', 'speed'))

PLOT_Invariance(model_object = HS_1939_output, 
                invar_model = 'Scalar',
                plot_types = c('LV_distribs')) 
# }

Run the code above in your browser using DataLab