cSEM (version 0.1.0)

testMICOM: Test measurement invariance of composites

Description

This functions performs the test for measurement invariance of composites proposed by Henseler2016;textualcSEM.

Usage

testMICOM(
 .object               = NULL,
 .alpha                = 0.05,
 .handle_inadmissibles = c("drop", "ignore", "replace"), 
 .R                    = 499,
 .seed                 = NULL,
 .verbose              = TRUE
 )

Arguments

.object

An R object of class cSEMResults resulting from a call to csem().

.alpha

An integer or a numeric vector of significance levels. Defaults to 0.05.

.handle_inadmissibles

Character string. How should inadmissible results be treated? One of "drop", "ignore", or "replace". If "drop", all replications/resamples yielding an inadmissible result will be dropped (i.e. the number of results returned will potentially be less than .R). For "ignore" all results are returned even if all or some of the replications yielded inadmissible results (i.e. number of results returned is equal to .R). For "replace" resampling continues until there are exactly .R admissible solutions. Depending on the frequency of inadmissible solutions this may significantly increase computing time. Defaults to "drop".

.R

Integer. The number of bootstrap replications. Defaults to 499.

.seed

Integer or NULL. The random seed to use. Defaults to NULL in which case an arbitrary seed is chosen. Note that the scope of the seed is limited to the body of the function it is used in. Hence, the global seed will not be altered!

.verbose

Logical. Should information (e.g., progress bar) be printed to the console? Defaults to TRUE.

Value

A named list of class cSEMTestMICOM containing the following list element:

$Step2

A list containing the results of the test for compositional invariance (Step 2).

$Step3

A list containing the results of the test for mean and variance equality (Step 3).

$Information

A list of additional information on the test.

Details

The test is only meaningful for concepts modeled as composites.

If more than two groups are to be compared issues related to multiple testing should be taken into account. Future versions of the package will include appropriate corrections.

Moreover, second-order models are not supported yet.

The number of permutation runs defaults to args_default()$.R for performance reasons. According to Henseler2016;textualcSEM the number of permutations should be at least 5000 for assessment to be sufficiently reliable.

References

See Also

csem(), cSEMResults, testOMF(), testMGD()

Examples

Run this code
# NOT RUN {
# NOTE: to run the example. Download and load the newst version of cSEM.DGP
# from GitHub using devtools::install_github("M-E-Rademaker/cSEM.DGP").

# Create two data generating processes (DGPs) that only differ in how the composite
# X is build. Hence, the two groups are not compositionally invariant.
dgp1 <- "
# Structural model
Y ~ 0.6*X

# Measurement model
Y =~ 1*y1
X <~ 0.4*x1 + 0.8*x2

x1 ~~ 0.3125*x2
"

dgp2 <- "
# Structural model
Y ~ 0.6*X

# Measurement model
Y =~ 1*y1
X <~ 0.8*x1 + 0.4*x2

x1 ~~ 0.3125*x2
"

g1 <- generateData(dgp1, .N = 399, .empirical = TRUE) # requires cSEM.DGP 
g2 <- generateData(dgp2, .N = 200, .empirical = TRUE) # requires cSEM.DGP

# Model is the same for both DGPs
model <- "
# Structural model
Y ~ X

# Measurement model
Y =~ y1
X <~ x1 + x2
"

# Estimate
csem_results <- csem(.data = list("group1" = g1, "group2" = g2), model)

# Test
testMICOM(csem_results, .R = 50, .alpha = c(0.01, 0.05), .seed = 1987)
# }

Run the code above in your browser using DataCamp Workspace