I am currently working on a saturated model with 6 groups (mzm, dzm, mzf, dzf, dosfm, dosmf) and a dichotomous outcome variable (with one threshold). See part of the saturated model below.
I have fitted 1 dichotomous definition variable in this model. At the first try it didn't work and after reading one of the previous threads I figured out that this is because the definition variable cannot have missings in OpenMx.
In my case, is there any way I can work around this without deleting all subjects who have missing values for the definition variable? I only need to take into account the one definition variable.
Thank you in advance!
mxMatrix(type="Stand", nrow=nvar, ncol=nvar, free=TRUE, values=0.02830624, name="expCovMZM" ),
mxMatrix(type="Zero", nrow=1, ncol=nvar, name="expMeanMZM" ),
mxMatrix(type="Full", nrow=nthresh, ncol=nvar, free=TRUE, labels=c("thrMZMt1", "thrMZMt2") ,values=thValues, lbound=thLBound, name="ThreMZM" ),
# Matrix with beta effect of definition variables on threshold
mxMatrix(type="Full", nrow=1, ncol=ndef, free=TRUE, values=-0.01, label="b1", name="b" ),
# Matrices for definition variables
mxMatrix(type="Full", nrow=ndef, ncol=nvar, free=FALSE, labels=c("data.definition_var_1", "data.definition_var_2"), name="Def"),
# Matrices to calculate effect on threshold (beta * definition variable)
mxAlgebra(expression= b %*% Def, name="DefR"),
# Matrix algebra to specify expected thresholds model
mxAlgebra(expression= ThreMZM + DefR, name="expThreMZM"),
mxMatrix(type="Iden", nrow=nvar, ncol=nvar, name="I"),
mxData(observed=mzmData, type="raw" ),
mxFIMLObjective(covariance="expCovMZM", means="expMeanMZM", dimnames=selVars, thresholds="expThreMZM")