Learn R Programming

semTools (version 0.5-1)

modindices.mi: Modification Indices for Multiple Imputations

Description

Modification indices (1-df Lagrange multiplier tests) from a latent variable model fitted to multiple imputed data sets. Statistics for releasing one or more fixed or constrained parameters in model can be calculated by pooling the gradient and information matrices across imputed data sets using Rubin's (1987) rules, or by pooling the test statistics across imputed data sets (Li, Meng, Raghunathan, & Rubin, 1991).

Usage

modindices.mi(object, type = c("D2", "Rubin"), standardized = TRUE,
  cov.std = TRUE, information = "expected", power = FALSE,
  delta = 0.1, alpha = 0.05, high.power = 0.75, sort. = FALSE,
  minimum.value = 0, maximum.number = nrow(LIST), na.remove = TRUE,
  op = NULL)

modificationIndices.mi(object, type = c("D2", "Rubin"), standardized = TRUE, cov.std = TRUE, information = "expected", power = FALSE, delta = 0.1, alpha = 0.05, high.power = 0.75, sort. = FALSE, minimum.value = 0, maximum.number = nrow(LIST), na.remove = TRUE, op = NULL)

Arguments

object

An object of class '>lavaan.mi

type

character indicating which pooling method to use. type = "D2" (default) indicates that modification indices that were calculated within each imputed data set will be pooled across imputations, as described in Li, Meng, Raghunathan, & Rubin (1991) and Enders (2010). "Rubin" indicates Rubin's (1987) rules will be applied to the gradient and information, and those pooled values will be used to calculate modification indices in the usual manner.

standardized

logical. If TRUE, two extra columns ($sepc.lv and $sepc.all) will contain standardized values for the EPCs. In the first column ($sepc.lv), standardizization is based on the variances of the (continuous) latent variables. In the second column ($sepc.all), standardization is based on both the variances of both (continuous) observed and latent variables. (Residual) covariances are standardized using (residual) variances.

cov.std

logical. TRUE if type == "D2". If TRUE (default), the (residual) observed covariances are scaled by the square-root of the diagonal elements of the \(\Theta\) matrix, and the (residual) latent covariances are scaled by the square-root of the diagonal elements of the \(\Psi\) matrix. If FALSE, the (residual) observed covariances are scaled by the square-root of the diagonal elements of the model-implied covariance matrix of observed variables (\(\Sigma\)), and the (residual) latent covariances are scaled by the square-root of the diagonal elements of the model-implied covariance matrix of the latent variables.

information

character indicating the type of information matrix to use (check lavInspect for available options). "expected" information is the default, which provides better control of Type I errors.

power

logical. If TRUE, the (post-hoc) power is computed for each modification index, using the values of delta and alpha.

delta

The value of the effect size, as used in the post-hoc power computation, currently using the unstandardized metric of the $epc column.

alpha

The significance level used for deciding if the modification index is statistically significant or not.

high.power

If the computed power is higher than this cutoff value, the power is considered 'high'. If not, the power is considered 'low'. This affects the values in the $decision column in the output.

sort.

logical. If TRUE, sort the output using the values of the modification index values. Higher values appear first.

minimum.value

numeric. Filter output and only show rows with a modification index value equal or higher than this minimum value.

maximum.number

integer. Filter output and only show the first maximum number rows. Most useful when combined with the sort. option.

na.remove

logical. If TRUE (default), filter output by removing all rows with NA values for the modification indices.

op

character string. Filter the output by selecting only those rows with operator op.

Value

A data.frame containing modification indices and (S)EPCs.

References

Enders, C. K. (2010). Applied missing data analysis. New York, NY: Guilford.

Li, K.-H., Meng, X.-L., Raghunathan, T. E., & Rubin, D. B. (1991). Significance levels from repeated p-values with multiply-imputed data.Statistica Sinica, 1(1), 65--92. Retrieved from https://www.jstor.org/stable/24303994

Rubin, D. B. (1987). Multiple imputation for nonresponse in surveys. New York, NY: Wiley.

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
## impose missing data for example
HSMiss <- HolzingerSwineford1939[ , c(paste("x", 1:9, sep = ""),
                                      "ageyr","agemo","school")]
set.seed(12345)
HSMiss$x5 <- ifelse(HSMiss$x5 <= quantile(HSMiss$x5, .3), NA, HSMiss$x5)
age <- HSMiss$ageyr + HSMiss$agemo/12
HSMiss$x9 <- ifelse(age <= quantile(age, .3), NA, HSMiss$x9)

## impute missing data
library(Amelia)
set.seed(12345)
HS.amelia <- amelia(HSMiss, m = 20, noms = "school", p2s = FALSE)
imps <- HS.amelia$imputations

## specify CFA model from lavaan's ?cfa help page
HS.model <- '
  visual  =~ x1 + x2 + x3
  textual =~ x4 + x5 + x6
  speed   =~ x7 + x8 + x9
'

out <- cfa.mi(HS.model, data = imps)

modindices.mi(out) # default: Li et al.'s (1991) "D2" method
modindices.mi(out, type = "Rubin") # Rubin's rules

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab