New syntax for runMLwiN: mixed hierarchical model
Posted: Thu Oct 01, 2015 4:37 pm
Hi Chris,
I'm using runMLwiN in R to estimate a mixed hierarchical model (2 continuous and 2 binary). The data is multilevel with patients (USUBJID) clustered within groups (STUDYID).
In the past I have been using successfully this code:
runMLwiN(Formula ="c(walk1, QOL1, probit(death12mo,denomb1), probit(NYHA_bin,denomb2)) ~
(0s|cons+CRT+SEX+CRTMALE) + (1s|cons.walk1 + cons.QOL1) + (2s|cons)",
D=c("Mixed","Normal","Normal","Binomial","Binomial"),
levID = c("STUDYID", "USUBJID"), indata = data.cca,
estoptions=list(EstM=1, mcmcMeth = list(fixM = 1, residM = 1,
Lev1VarM = 1)), MLwiNPath = 'C:/Program Files (x86)/MLwiN v2.30')
However, with the new updates to the R2MLwiN package this syntax does not work anymore (for various reasons). I'm trying to use the new syntax but haven't been successful so far (tried a few alternatives):
runMLwiN( c(walk1, QOL1, probit(death12mo,denomb1), probit(NYHA_bin,denomb2)) ~
1+CRT+SEX+CRTMALE + (1|STUDYID) + (1|USUBJID),
D=c("Mixed","Normal","Normal","Binomial","Binomial"),
estoptions=list(EstM=1, mcmcMeth = list(fixM = 1, residM = 1, Lev1VarM = 1))
data = data.cca, MLwiNPath = 'C:/Program Files (x86)/MLwiN v2.30')
Could you please help me correct this new syntax? (simple random intercept mixed model, with a separate coefficients for each response)
I'm using runMLwiN in R to estimate a mixed hierarchical model (2 continuous and 2 binary). The data is multilevel with patients (USUBJID) clustered within groups (STUDYID).
In the past I have been using successfully this code:
runMLwiN(Formula ="c(walk1, QOL1, probit(death12mo,denomb1), probit(NYHA_bin,denomb2)) ~
(0s|cons+CRT+SEX+CRTMALE) + (1s|cons.walk1 + cons.QOL1) + (2s|cons)",
D=c("Mixed","Normal","Normal","Binomial","Binomial"),
levID = c("STUDYID", "USUBJID"), indata = data.cca,
estoptions=list(EstM=1, mcmcMeth = list(fixM = 1, residM = 1,
Lev1VarM = 1)), MLwiNPath = 'C:/Program Files (x86)/MLwiN v2.30')
However, with the new updates to the R2MLwiN package this syntax does not work anymore (for various reasons). I'm trying to use the new syntax but haven't been successful so far (tried a few alternatives):
runMLwiN( c(walk1, QOL1, probit(death12mo,denomb1), probit(NYHA_bin,denomb2)) ~
1+CRT+SEX+CRTMALE + (1|STUDYID) + (1|USUBJID),
D=c("Mixed","Normal","Normal","Binomial","Binomial"),
estoptions=list(EstM=1, mcmcMeth = list(fixM = 1, residM = 1, Lev1VarM = 1))
data = data.cca, MLwiNPath = 'C:/Program Files (x86)/MLwiN v2.30')
Could you please help me correct this new syntax? (simple random intercept mixed model, with a separate coefficients for each response)