PLOT_Invariance: Plots of multiple groups factor analysis invariance...

View source: R/PLOT_Invariance.R

PLOT_InvarianceR Documentation

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)

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.

Value

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

Author(s)

Brian P. O'Connor

Examples

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) 

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')) 


EFA.dimensions documentation built on Sept. 14, 2026, 9:08 a.m.