Hi,
I have a dataset of twins on 4 time-points and a covariate which does not vary over time. I can fit the Multivariate cholesky decompositon model with ACE components but stuck at the case where I want to include that covariate at each time-point.
This how I was including the covariate (snp),
defSNP <- mxMatrix( type="Full", nrow=1, ncol=2, free=FALSE, labels=c("data.snp1","data.snp2"), name="snp" ) {note that snp1 corresponds to twin 1 and snp2 corresponds to twin 2)
pathB <- mxMatrix( type="Full", nrow=1, ncol=4, free=TRUE, values=.01, labels=c("b11","b12","b13","b14"), name="b")
meanG <- mxMatrix( type="Full", nrow=1, ncol=8, free=TRUE,
values=svMe, labels=labFull("me",1,4), name="expMean" )
expMean <- mxAlgebra( expression= meanG + cbind(b%*%snp,b%*%snp), name="expMean" )
{have also tried expression=meanG + b%*% snp}
It gives the error,
In model 'CholACE' Optimizer returned a non-zero status code 5. The Hessian at the solution does not appear to be convex (Mx status RED)
and starting values of b as their final estimates and sd 0. Clearly, I have been specifying it wrong, can anybody help?
And another question, how does OpenMx calculates the estimates? In my understanding, these are the MLE's obtained by maximizing a multivariate likelihood? Is that correct?