[R-sig-ME] fitting mixed effects logistic regression with weights

Gebregziabher, Mulugeta gebregz at musc.edu
Fri Jun 10 22:24:41 CEST 2011


Dear all,

I have been trying to fit a logistic regression model with random intercept for survey sampled data using the lmer in the lme4 package. I also want to get HPD intervals. I tried family=binomial as well as family=quasibinomial. I am encountering the following errors. "Eror in .local(object, n, verbose, ...) : Update not yet written" and  "Error in HPD interval(mcmcsamp(fit, 1000)) :   error in evaluating the argument 'object' in selecting a method for function 'HPDinterval'. See more below:

Does anyone know how to go around this problem?
Thanks.

> library(lme4)
Loading required package: Matrix
Loading required package: lattice
Attaching package: 'Matrix'
The following object(s) are masked from 'package:base':
    det
Attaching package: 'lme4'
The following object(s) are masked from 'package:stats':
    AIC
> attach(cohort)
> 
> f  <- a1cge8 ~  (1|id)   +  time  +  nhb  + hispanic  + other  +  male  + mstat  +svcpct   +urban   +  comor1   +comor2  + comor3          
>                
> est        <- round(slot(summary(fit), "coefs")[,1], digits=2)
>    t       <- slot(summary(fit), "coefs")[,3]
>    df      <- c(1, 1, 3, 3, 3, 1, 1, 1, 1, 3, 3, 3)
> p.value    <- ifelse(t<0, round(pt(t, df=df), digits=3), round(1-pt(t, df), digits=3) )
> se         <- round(slot(summary(fit), "coefs")[,2], digits=4)
> ci         <- HPDinterval(mcmcsamp(fit, 1000))
Error in .local(object, n, verbose, ...) : Update not yet written
Error in HPDinterval(mcmcsamp(fit, 1000)) : 
  error in evaluating the argument 'object' in selecting a method for function 'HPDinterval'
> lower <- round(ci$fixef[,1], digits=2)
Error: object 'ci' not found
> upper <- round(ci$fixef[,2], digits=2)
Error: object 'ci' not found
__________________________________________
Mulugeta Gebregziabher, PhD
Assistant Professor
Division of Biostatistics and Epidemiology
135 cannon St. Suite 303
Charleston, SC 29425
Tel: 843-876-1112; Fax: 843-876-1126
E-mail: gebregz at musc.edu



More information about the R-sig-mixed-models mailing list