This family is the two-level random intercept variant of the lvm
model family. It is mostly a special case of the dlvm1
family, with the addition of structural effects rather than temporal effects in the beta
matrix.
ml_lnm(...)
ml_rnm(...)
ml_lrnm(...)
ml_lvm(data, lambda, clusters, within_latent = c("cov",
"chol", "prec", "ggm"), within_residual = c("cov",
"chol", "prec", "ggm"), between_latent = c("cov",
"chol", "prec", "ggm"), between_residual = c("cov",
"chol", "prec", "ggm"), beta_within = "zero",
beta_between = "zero", omega_zeta_within = "full",
delta_zeta_within = "full", kappa_zeta_within =
"full", sigma_zeta_within = "full",
lowertri_zeta_within = "full", omega_epsilon_within =
"zero", delta_epsilon_within = "diag",
kappa_epsilon_within = "diag", sigma_epsilon_within =
"diag", lowertri_epsilon_within = "diag",
omega_zeta_between = "full", delta_zeta_between =
"full", kappa_zeta_between = "full",
sigma_zeta_between = "full", lowertri_zeta_between =
"full", omega_epsilon_between = "zero",
delta_epsilon_between = "diag", kappa_epsilon_between
= "diag", sigma_epsilon_between = "diag",
lowertri_epsilon_between = "diag", nu, nu_eta,
identify = TRUE, identification = c("loadings",
"variance"), vars, latents, groups, equal = "none",
baseline_saturated = TRUE, estimator = c("FIML",
"MUML"), optimizer, storedata = FALSE, verbose =
FALSE, standardize = c("none", "z", "quantile"),
sampleStats, bootstrap = FALSE, boot_sub,
boot_resample)
An object of the class psychonetrics (psychonetrics-class)
A data frame encoding the data used in the analysis. Must be a raw dataset.
A model matrix encoding the factor loading structure. Each row indicates an indicator and each column a latent. A 0 encodes a fixed to zero element, a 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix. Could also be the result of simplestructure
.
A string indicating the variable in the dataset that describes group membership.
The type of within-person latent contemporaneous model to be used.
The type of within-person residual model to be used.
The type of between-person latent model to be used.
The type of between-person residual model to be used.
A model matrix encoding the within-cluster structural. A 0 encodes a fixed to zero element, a 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix. Defaults to "zero"
.
A model matrix encoding the between-cluster structural. A 0 encodes a fixed to zero element, a 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix. Defaults to "zero"
.
Only used when within_latent = "ggm"
. Can be "full"
, "zero"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_latent = "ggm"
. Can be "diag"
, "zero"
(not recommended), or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_latent = "prec"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_latent = "cov"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_latent = "chol"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_residual = "ggm"
. Can be "full"
, "zero"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_residual = "ggm"
. Can be "diag"
, "zero"
(not recommended), or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_residual = "prec"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_residual = "cov"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when within_residual = "chol"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_latent = "ggm"
. Can be "full"
, "zero"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_latent = "ggm"
. Can be "diag"
, "zero"
(not recommended), or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_latent = "prec"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_latent = "cov"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_latent = "chol"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_residual = "ggm"
. Can be "full"
, "zero"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_residual = "ggm"
. Can be "diag"
, "zero"
(not recommended), or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_residual = "prec"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_residual = "cov"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Only used when between_residual = "chol"
. Can be "full"
, "diag"
, or a typical model matrix with 0s indicating parameters constrained to zero, 1s indicating free parameters, and higher integers indicating equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
Optional vector encoding the intercepts of the observed variables. Set elements to 0 to indicate fixed to zero constrains, 1 to indicate free intercepts, and higher integers to indicate equality constrains. For multiple groups, this argument can be a list or array with each element/column encoding such a vector.
Optional vector encoding the intercepts of the latent variables. Set elements to 0 to indicate fixed to zero constrains, 1 to indicate free intercepts, and higher integers to indicate equality constrains. For multiple groups, this argument can be a list or array with each element/column encoding such a vector.
Logical, should the model be automatically identified?
Type of identification used. "loadings"
to fix the first factor loadings to 1, and "variance"
to fix the diagonal of the latent variable model matrix (sigma_zeta, lowertri_zeta, delta_zeta or kappa_zeta) to 1.
An optional character vector with names of the variables used.
An optional character vector with names of the latent variables.
An optional string indicating the name of the group variable in data
.
A character vector indicating which matrices should be constrained equal across groups.
A logical indicating if the baseline and saturated model should be included. Mostly used internally and NOT Recommended to be used manually.
Estimator used. Currently only "FIML"
is supported.
The optimizer to be used. Usually either "nlminb"
(with box constrains) or "ucminf"
(ignoring box constrains), but any optimizer supported by optimr
can be used.
Logical, should the raw data be stored? Needed for bootstrapping (see bootstrap
).
Logical, should progress be printed to the console?
Which standardization method should be used? "none"
(default) for no standardization, "z"
for z-scores, and "quantile"
for a non-parametric transformation to the quantiles of the marginal standard normal distribution.
An optional sample statistics object. Mostly used internally.
Should the data be bootstrapped? If TRUE
the data are resampled and a bootstrap sample is created. These must be aggregated using aggregate_bootstraps
! Can be TRUE
or FALSE
. Can also be "nonparametric"
(which sets boot_sub = 1
and boot_resample = TRUE
) or "case"
(which sets boot_sub = 0.75
and boot_resample = FALSE
).
Proportion of cases to be subsampled (round(boot_sub * N)
).
Logical, should the bootstrap be with replacement (TRUE
) or without replacement (FALSE
)
Arguments sent to 'ml_lvm'
Sacha Epskamp <mail@sachaepskamp.com>