The supplementary materials illustrate the use of the accompanying R package equaltestMI. The sample statistics from Table 1 of Lee and Al Otaiba (2015) are used as an example. The description of the data can be found in the original article and the results obtained from equaltestMI are discussed at length in the submitted article “Measurement Invariance Via Equivalence Testing”.

The R package equaltestMI is available on CRAN and can be downloaded for use on any R platform with version higher than 3.1.0. Users can pass different arguments to the main function eqMI.main() to examine measurement invariance using the conventional multiple-group approach or equivalence testing approach. Under the framework of equivalence testing, users obtain the minimum tolerable size (T-size) and adjusted cutoff values to evaluate the goodness-of-fit of each invariance test. The projection method is also available for testing the equality of latent means.

\newline

## load package # install.packages("equaltestMI") library(equaltestMI) # or install the most recent version from GitHub # install.packages("devtools") # library(devtools) # devtools::install_github("gabriellajg/equaltestMI", force=TRUE) library(equaltestMI)

\newline

## sample statistics where M1 and M2 are sample means, and Cov1 and Cov2 are sample covariance matrices; ## group 1 = boys ineligible for free-reduced lunches ## group 2 = boys eligible for free-reduced lunches #setwd("C:/research/equaltestMI") Group1 <- read.table('Group1.txt', header = TRUE) Group2 <- read.table('Group2.txt', header = TRUE) Group1 <- as.matrix(Group1) Group2 <- as.matrix(Group2) M1 <- Group1[1,] M2 <- Group2[1,] Cov1 <- Group1[2:7,] Cov2 <- Group2[2:7,]

## lavaan model syntax model <- ' AlphabetKnowledge =~ Letter_Name+ Letter_Sound PhonologicalAwareness =~ Blending + Elision Spelling =~ Real_Words + Pseudo_Words '

\newline

## the results using equivalence testing and projection method ## full R output will be presented in Part 3 test <- eqMI.main(model = model, sample.nobs = c(78, 174), sample.mean = list(M1, M2), sample.cov = list(Cov1, Cov2), meanstructure = TRUE, output = 'both', quiet = FALSE, equivalence.test = TRUE, adjRMSEA = TRUE, projection = TRUE, bootstrap = FALSE)

\newline

Sample means:

M1

Sample Covariance Matrix:

round(Cov1, 3)

\newline

Sample means:

M2

Sample Covariance Matrix:

round(Cov2, 3)

\newline

## the results using equivalence testing and projection method test <- eqMI.main(model = model, sample.nobs = c(78, 174), sample.mean = list(M1, M2), sample.cov = list(Cov1, Cov2), meanstructure = TRUE, output = 'both', quiet = FALSE, equivalence.test = TRUE, adjRMSEA = TRUE, projection = TRUE, bootstrap = FALSE)

\newline

- results using conventional multiple-group SEM approach:

test1 <- eqMI.main(model = model, sample.nobs = c(78, 174), sample.cov = list(Cov1, Cov2), sample.mean = list(M1, M2), meanstructure = TRUE, equivalence.test = FALSE, adjRMSEA = FALSE)

- results using conventional multiple-group SEM approach with mean structure tested by projection method:

test2 <- eqMI.main(model = model, sample.nobs = c(78, 174), sample.cov = list(Cov1, Cov2), sample.mean = list(M1, M2), meanstructure = TRUE, equivalence.test = FALSE, adjRMSEA = FALSE, projection = TRUE)

- results using equivalence testing:

test3 <- eqMI.main(model = model, sample.nobs = c(78, 174), sample.cov = list(Cov1, Cov2), sample.mean = list(M1, M2), meanstructure = TRUE, equivalence.test = TRUE, adjRMSEA = FALSE)

- results using equivalence testing and adjusted cutoff values:

test4 <- eqMI.main(model = model, sample.nobs = c(78, 174), sample.cov = list(Cov1, Cov2), sample.mean = list(M1, M2), meanstructure = TRUE, equivalence.test = TRUE, adjRMSEA = TRUE)

- analysis of 4 with mean structure tested by projection method:

test5 <- eqMI.main(model = model, sample.nobs = c(78, 174), sample.cov = list(Cov1, Cov2), sample.mean = list(M1, M2), meanstructure = TRUE, equivalence.test = TRUE, adjRMSEA = TRUE, projection = TRUE)

- if any of the tests above evaluate only mean structure or only covariance structure, add the argument "structure = 'mean'" or "structure = 'covariance'", say test5 with only mean structure:

test6 <- eqMI.main(model = model, structure = 'mean', sample.nobs = c(78, 174), sample.cov = list(Cov1, Cov2), sample.mean = list(M1, M2), meanstructure = TRUE, equivalence.test = TRUE, adjRMSEA = TRUE, projection = TRUE)

- if raw data are available, say the name of the raw data is 'literacy.dat' and the variable of group membership is 'FRL', then test5 is conducted as:

test7 <- eqMI.main(model = model, data = literacy.dat, group = "FRL", meanstructure = TRUE, equivalence.test = TRUE, adjRMSEA = TRUE, projection = TRUE)

- when raw data are available and project method is used, bootstrap resampling can be used to obtain empirical p-values of the tests conducted by project method by enabling bootstrap = TRUE.

#test8 <- eqMI.main(model = model, data = literacy.dat, # group = "FRL", meanstructure = TRUE, # equivalence.test = TRUE, adjRMSEA = TRUE, # projection = TRUE, bootstrap = TRUE)

- in any of the tests above, the users can suppress the printing of results (not recommended) though the results are still contained in test9$eqMI.stat:

test9 <- eqMI.main(model = model, data = literacy.dat, group = "FRL", meanstructure = TRUE, equivalence.test = TRUE, adjRMSEA = TRUE, projection = TRUE, bootstrap = FALSE, quite = TRUE)

- in any of the tests above, the users can allow partial invariance by adding 'group.partial':

test10 <- eqMI.main(model = model, data = literacy.dat, group = "FRL", meanstructure = TRUE, group.partial = c("Spelling=~Real_Words", "Blending~1"), equivalence.test = TRUE, adjRMSEA = TRUE, projection = TRUE)

so that the loadings of 'Spelling' on 'Real_Words' and the intercept of 'Blending' are allowed to vary across groups.

\newline

\newline

# For a complete view of the help page of function eqMI.main(), please install R package printr library(printr) ?eqMI.main

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.