InvarianceMatrices: Invariance matrices

Description Usage Arguments Details Value

View source: R/InvarianceMatrices.R

Description

InvarianceMatrices creates weak, strong, and strict invariance matrices and returns them as a list.

Usage

1
2
InvarianceMatrices(data, group.variable, lavaan.equations,
  number.cores = 1L)

Arguments

data

A data frame that contains the data for each group as well as a column that indicates the group of each row. The data should be organized such that each indicator has 1 column with data from all groups,

group.variable

A string indicating the name of the grouping column in data

lavaan.equations

A string describing the structural equation model to examine measurement invariance (typically a confirmatory factor analysis model). This should be written in lavaan model syntax. See lavaan and http://lavaan.ugent.be/tutorial/syntax1.html.

number.cores

An integer specifying the number of (logical) cores to use. By default, only 1 core is used. Using all cores could slow down other programs running simultaneously. Thus, it is recommended to use 1 or 2 less cores than the maximum possible. See detectCores.

Details

This function takes tests each pair of groups for weak, strong, and strict measurement invariance. The change in the CFI is calculated for each type of measurement invariance, as recommended by Cheung & Rensovld (2002).

Because each pair of groups is examined, computational load (and thus runtime) can become high when there are many groups. For this reason, pairs of groups can be assessed in parallel with the number.cores argument.

Value

Thus function returns a list containing the weak, strong, and strict invariance matrices.


sethmargolis/PairMeasInv documentation built on May 23, 2019, 1:48 p.m.