Hello
I am using glmmBUGS to fit a multilevel model. Treatments are nested in
Course are nested in Patients. The predicted variable in total EEG duration.
The predictors are:
at the observation level : Medication dose
at the Course level: Weight in KG and Age
at the Patient level: Weight in KG and Age
I am trying to fit a multilevel model as in lmer, but in BUGS. Here is an
example of the model I want to run:
Linear mixed model fit by REML
Formula: totalEEG ~ workDose + (1 + WEIGHTKG + AgeYrs | MRN/COURSE)
Data: book
AIC BIC logLik deviance REMLdev
7041 7112 -3506 7004 7011
Random effects:
Groups Name Variance Std.Dev. Corr
COURSE:MRN (Intercept) 6.5755e-06 2.5643e-03
WEIGHTKG 1.9015e-11 4.3606e-06 -1.000
AgeYrs 1.1138e-09 3.3373e-05 -1.000 1.000
MRN (Intercept) 5.0897e+02 2.2560e+01
WEIGHTKG 2.8231e-02 1.6802e-01 -1.000
AgeYrs 8.1881e-04 2.8615e-02 1.000 -1.000
Residual 2.4965e+02 1.5800e+01
Number of obs: 818, groups: COURSE:MRN, 114; MRN, 103
Fixed effects:
Estimate Std. Error t value
(Intercept) 51.721608 1.669860 30.974
workDose -0.010632 0.003246 -3.275
Correlation of Fixed Effects:
(Intr)
workDose -0.663
bgs.toteeg<-glmmBUGS(data=book, observations="totalEEG",
covariates=list(MRN="AgeYrs", COURSE="WEIGHTKG",
observations="workDose"),
effects=c("MRN", "COURSE"), family="gaussian",
modelFile="model.bug")
however, this is failing with:
Error in glmmBUGS(data = book, observations = "totalEEG", covariates
list(MRN = "AgeYrs", :
unused argument(s) (observations = "totalEEG", covariates = list(MRN
"AgeYrs", COURSE = "WEIGHTKG"))
I have already run models with multiple predictors at the lowest level.
glmmBUGS parameterises and runs a WINBUGS model fine. however, this full
mixed model seems not to work.
When I tried:
> bgs.toteeg<-glmmBUGS(data=book, totalEEG~workDose,
reparam=c(MRN="AgeYrs",
> COURSE="WEIGHTKG"), effects=c("MRN",
"COURSE"), family="poisson",
> modelFile="model.bug")
IT compiled the WinBUGS model fine, but winBUGS stalled on an error, not
recognising a node "xobservations".
I'm learning, so it's not just a case where I can "step-up"
and model it
directly in Winbugs.
R 2.13.2 on Win 7 i3Intel with lmer, nlme, R2WinBUGS, BRugs, lattice,
attached. Winbugs version 14.3. (Which I know is working fine - Brainware
problem most likely)
Thank you
Ross
ross.dunne at tcd.ie
--
View this message in context:
http://r.789695.n4.nabble.com/glmmBUGS-fails-to-accept-higher-level-covariates-tp3945251p3945251.html
Sent from the R help mailing list archive at Nabble.com.