Hi Everybody!!!
I'm really naive using OpenMx. So probably my question is a silly mistake. Any way;
I try to perform a twin analysis with sex and age as covariates. I have used the script "UnivariateTwinAnalysis_MatrixRaw-3" from Dr. neale that I found in this forum. But I don't want generate sex and age data because I have mine. So I changed a bit the script.
summary(test)
selVars <- c('hear1','hear2')
mzData <- as.matrix(subset(test, zyg==1, c(hear1,hear2,sex1,sex2,age1,age2)))
dzData <- as.matrix(subset(test, zyg==2, c(hear1,hear2,sex1,sex2,age1,age2)))
colMeans(mzData,na.rm=TRUE)
colMeans(dzData,na.rm=TRUE)
cov(mzData,use="complete")
cov(dzData,use="complete")
head(mzData)
head(dzData)
I haven't change any more in the script. However when I run the script I have the following Error message:
Error: The data object 'MZ.data' contains an observed matrix that is not of type 'double'
Any suggestions to fix it??
Thank you so much in advance!!