[R-sig-ME] fitting mixed effects logistic regression with weights
Gebregziabher, Mulugeta
gebregz at musc.edu
Fri Jun 10 22:48:44 CEST 2011
So, how do we get comparable estimates/inference to Proc GLIMMIX of SAS?
________________________________________
From: Ben Bolker [bbolker at gmail.com]
Sent: Friday, June 10, 2011 4:45 PM
To: Gebregziabher, Mulugeta
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] fitting mixed effects logistic regression with weights
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/10/2011 04:44 PM, Gebregziabher, Mulugeta wrote:
> Dear Ben,
>
> Thank you for your prompt response. Does MCMCglmm provide the usual
> REML/RSPL estimates or Bayesian estimates for the fixed effects? I
> mean are the coefficient and SE estimates REML/RSPL or Bayesian? I
> want to be sure what I am getting.
Bayesian.
>
> Mulugeta ________________________________________ From:
> r-sig-mixed-models-bounces at r-project.org
> [r-sig-mixed-models-bounces at r-project.org] On Behalf Of Ben Bolker
> [bbolker at gmail.com] Sent: Friday, June 10, 2011 4:33 PM To:
> r-sig-mixed-models at r-project.org Subject: Re: [R-sig-ME] fitting
> mixed effects logistic regression with weights
>
> On 06/10/2011 04:24 PM, Gebregziabher, Mulugeta wrote:
>> 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'.
>
> As the error message suggests (obliquely!), mcmcsamp() does not yet
> work for GLMMs (i.e. [g]lmer with 'family' specified). Furthermore,
> quasi-likelihood fitting no longer works with the latest releases of
> lme4 (because the author decided that he didn't really understand
> what it was doing, hence safer to omit it).
>
> Have you considered MCMCglmm, or parametric bootstrapping
> (help("simulate-mer")) ?
>
>
> 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
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3ygmoACgkQc5UpGjwzenOtMgCfeLQqLNmgnCkQfpabYK2ZJVkY
OKEAn2IymZ9yk8YlBa8LtRJB4fWrcSfj
=bRw3
-----END PGP SIGNATURE-----
More information about the R-sig-mixed-models
mailing list