MIs {psychonetrics} | R Documentation |
Print modification indices
Description
This function prints a list of modification indices (MIs)
Usage
MIs(x, all = FALSE, matrices, type = c("normal", "equal", "free"), top = 10,
verbose = TRUE, nonZero = FALSE)
Arguments
x |
A |
all |
Logical, should all MIs be printed or only the highest? |
matrices |
Optional vector of matrices to include in the output. |
type |
String indicating which kind of modification index should be printed. ( |
top |
Number of MIs to include in output if |
verbose |
Logical, should messages be printed? |
nonZero |
Logical, should only MIs be printed of non-zero parameters? Useful to explore violations of group equality. |
Value
Invisibly returns a relevant subset of the data frame containing all information on the parameters, or a list of such data frames if multiple types of MIs are requested.
Author(s)
Sacha Epskamp
Examples
# Load bfi data from psych package:
library("psychTools")
data(bfi)
# Also load dplyr for the pipe operator:
library("dplyr")
# Let's take the agreeableness items, and gender:
ConsData <- bfi %>%
select(A1:A5, gender) %>%
na.omit # Let's remove missingness (otherwise use Estimator = "FIML)
# Define variables:
vars <- names(ConsData)[1:5]
# Let's fit a full GGM:
mod <- ggm(ConsData, vars = vars, omega = "zero")
# Run model:
mod <- mod %>% runmodel
# Modification indices:
mod %>% MIs