[R-sig-ME] "parm" parameter in lme4::confint.merMod
Ben Bolker
bbolker at gmail.com
Sun May 18 16:21:00 CEST 2014
On 14-05-18 07:34 AM, Henrik Singmann wrote:
> Hi Jake,
>
> I think fixef() or names(fixef()) gives you what you want:
I don't think it gets you everything. Your solution works
in the method="Wald" case because method="Wald" only returns
the fixed effects, so one only has to keep track of those
positions. method="profile" and "boot" include both
variance-covariance and fixed effect parameters, in that order.
Some possibilities are
names(unlist(getME(m1,c("theta","fixef"))))
## this gives names of 'theta' parameters (i.e. Cholesky factors)
## rather than standard deviations/correlations, but I believe
## the order is the same
## theta parameters only (hidden function)
lme4:::tnames(m1)
require(lme4)
data(md_16.4, package = "afex")
m1 <- lmer(induct ~ cond*cog + (cog|room:cond), md_16.4)
## I actually had some problems with profiling this example --
## not quite sure why. Will have to look into it.
pp <- profile(m1)
confint(m1,parm=3)
> fixef(m1)
> ## (Intercept) cond1 cog cond1:cog
> ## -6.14153043 10.32001485 0.66722061 -0.02520666
>
> confint(m1, parm = c(3,2), method="Wald")
> ## 2.5 % 97.5 %
> ## cog 0.2498764 1.084565
> ## cond1 -18.4845630 39.124593
>
> I hope I didn't misunderstand your question,
> Henrik
>
>
> Am 18.05.2014 08:03, schrieb Jake Westfall:
>> Hi all,
>>
>> According to the documentation, in confint.merMod() you can use the
>> "parm" parameter to get confidence intervals for only a specified
>> subset of parameters by indicating the integer positions of the
>> desired parameters. But how is one supposed to know which integer
>> positions correspond with which parameters? I poked around a little
>> but found nothing in the methods or slots of the merMod object that
>> indicates this, and nothing in the documentation detailing this. Have
>> I missed something? I guess you can call the function leaving that
>> argument at its default, and the order of the parameters in that
>> output will correspond with the integer positions, but this approach
>> would seem to defeat the point of being able to specify particular
>> subsets of parameters...
>>
>> Jake
>> [[alternative HTML version deleted]]
>>
>
More information about the R-sig-mixed-models
mailing list