[R-sig-ME] What to do when a subset of binomial data has only positive outcomes
Jarrod Hadfield
j.hadfield at ed.ac.uk
Sun Aug 1 10:53:01 CEST 2010
Hi,
You can fit (crossed) random effects in MCMCglmm using the random
argument (random=~subject+word for your model). A good prior for
complete separation with random effects is a little more involved
though, and I'm not completely sure what is the best approach. In the
example I sent before the only random effects were the residuals which
had known variance (1). Having a flatish prior on the probability
scale after marginalising the residuals was quite easy as it just
involved adding 1 to pi^2/3 (for the logit link) or adding 1 to 1
(probit link). With additional random effects you may want to have a
prior that is also flat after marginalisation. This would involve
replacing 1 with the sum of all variance components. Of course you
don't know this a priori (you're trying to estimate it) which creates
a problem. However, you can probably make a sensible guess and see how
sensitive you're conclusions would be to alternative prior
specifications.
Cheers,
Jarrod
Quoting Xiao He <praguewatermelon at gmail.com>:
> Hi Jarrod,
>
> Thanks for the suggestion. But as I wrote in my previous reply, one issue
> with the several alternative models that I've found or that have been
> suggested to me is that they don't take random effects, and I have to
> include these effects due to the nature of my experiment. It would be great
> if you knew any alternative methods that could take random effects.
>
> I found an alternative solution that relies on likelihood-ratio test, in
> this link: http://www.mail-archive.com/r-lang@ling.ucsd.edu/msg00115.html .
> Based on the proposed solution, since compoundType has 3 levels, a new
> predictor "compoundType1" will be created by combining the offending level
> "green" (the one with no variance) with another level, as shown below:.
>
> e.g. >compound$compoundType1<-ifelse(compound$compoundType == "green,"
> "greenANDred", ifelse(
> ompound$compoundType == "red," "greenANDred", "blue")).
>
> This will result in two factors: blue, greenANDred
>
> Then, I will run the following model comparison:
> ***************************************************
>> native.lmer = lmer (word1 ~ compoundType + (1 | subject) + (1|word), data
> = compound, family = "binomial",REML=F)
>> native2.lmer = lmer (word1 ~ compoundType1 + (1 | subject) + (1|word),
> data = compound, family = "binomial",REML=F)
>
>
>> anova(deacc.lmer,deacc.lmer1)
>
> ****************************************************
>
> But I don't really know the underlying logic of this method, so I don't know
> how to explain the results obtained from this kind of method. What does it
> mean if I obtained significant difference between the two models? What does
> it mean if no significance was detected?
>
> An explanation of this method would be much appreciated! Thanks!
>
> _____________________________________
> Message: 2
> Date: Sat, 31 Jul 2010 14:22:19 +0100
> From: Jarrod Hadfield <j.hadfield at ed.ac.uk>
> To: Ben Bolker <bbolker at gmail.com>
> Cc: Timothy_Handley at nps.gov, r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] What to do when a subset of binomial data has
> only positive outcomes
> Message-ID: <20100731142219.dsk04v6o00w8gw8g at www.staffmail.ed.ac.uk>
> Content-Type: text/plain; charset=UTF-8; DelSp="Yes";
> format="flowed"
>
> You may want to take a look at A WEAKLY INFORMATIVE DEFAULT PRIOR
> DISTRIBUTION FOR LOGISTIC AND OTHER REGRESSION MODELS Gelman et. al.
> 2008 The annals of applied statistics 2 pp1360-1383 which you will
> need to implement in BUGS or JAGS. However, an easier route may be to
> to use normal priors on the coefficients and use MCMCglmm. In many
> cases I think this prior specification has good properties. For example:
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list