[R-sig-ME] lme4 and confidence intervals
Ben Bolker
bbolker at gmail.com
Wed Oct 23 23:20:06 CEST 2013
The problem is that your version of R is sufficiently old (version
2.15, the next major release, was released about 18 months ago, which in
R time is "old") that you are picking up a version of lme4 that doesn't
implement confint().
The easiest thing (at least from my point of view) would be to upgrade
your version of R, but if you are constrained to 2.14 for other reasons
you *might* be able to install a more recent version by downloading it
manually from CRAN or http://lme4.r-forge.r-project.org/repos and
installing locally. You're liable to run into minor, and possibly
major, hassles this way because of various changes/incompatibilities
between R versions. (For example, I know we use paste0() internally -- I
think it was introduced in 2.15 -- that one is easy to work around, but
there are probably other compatibility problems ...)
Ben Bolker
On 13-10-23 03:18 PM, Nicholas Mitsakakis wrote:
> Hi Ben,
>
> here is what I get:
>
> R version 2.14.0 (2011-10-31)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252
> [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
> [5] LC_TIME=English_Canada.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] lme4_0.999999-0 Matrix_1.0-1 lattice_0.20-0
>
> loaded via a namespace (and not attached):
> [1] grid_2.14.0 nlme_3.1-102 stats4_2.14.0
>
>
> Does the problem have anything to do with the fact I am using 64-bit?
>
> Any way to by pass this problem?
>
> Thanks a lot for your help.
> Nicholas
>
>
> On Wed, Oct 23, 2013 at 3:04 PM, Ben Bolker <bbolker at gmail.com
> <mailto:bbolker at gmail.com>> wrote:
>
> This works for me with the development version of lme4 (although I do
> get some warnings about cov2cor() that have been referenced on another
> recent thread, and the confidence intervals for the Insitution RE are
> not getting calculated). I strongly suspect it will also work with the
> release version, although I haven't tested it.
>
> Can you start with a clean session and give the results of
> sessionInfo() ??
>
>
> On 13-10-23 01 <tel:13-10-23%2001>:03 PM, Nicholas Mitsakakis wrote:
> > Hi Ben,
> >
> > I am attaching a dataset, brazil. The code I used is
> >
> > I <- which(as.numeric(brazil$state) == 1 & as.numeric(brazil$drug)
> == 1)
> > modref2 <- lmer(log.Std.Unit.Price ~ 1 + (1|Institution) +
> (1|supplier)
> > + log(Quantity) + as.numeric(Date), brazil, subset = I)
> > confint(modref2)
> >
> >
> > Please let me know if you are getting the same problem.
> >
> > Thanks a lot,
> > Nicholas
> >
> >
> >
> >
> > On Wed, Oct 23, 2013 at 12:51 PM, Ben Bolker <bbolker at gmail.com
> <mailto:bbolker at gmail.com>
> > <mailto:bbolker at gmail.com <mailto:bbolker at gmail.com>>> wrote:
> >
> > [cc'ing to r-sig-mixed models]
> >
> > This doesn't happen for me: I would need a reproducible
> example in
> > order to be able to see what's going on.
> >
> > sincerely
> > Ben Bolker
> >
> >
> > On 13-10-23 12 <tel:13-10-23%2012> <tel:13-10-23%2012>:31 PM,
> Nicholas Mitsakakis wrote:
> > > Hello Bob,
> > >
> > > I want to get the (or some) confidence intervals for the
> coefficients
> > > from a mixed effects model fitted by the lmer function. I
> noticed
> > in the
> > > lme4 documentation that confint function can do this but it
> does not
> > > work for me giving errors messages:
> > >
> > > Error: $ operator not defined for this S4 class
> > >
> > > I have installed the most recent version of lme4 from CRAN.
> > >
> > > Am I missing something?
> > >
> > > I would appreciate it if you could let me know.
> > >
> > > Regards,
> > > nicholas
> > >
> > > --
> > > Nicholas Mitsakakis, MSc, PhD
> > > Biostatistician
> > > Toronto Health Economics and Technology Assessment (THETA)
> > Collaborative
> > > Assistant Professor
> > > Leslie Dan Faculty of Pharmacy, University of Toronto
> > > 6th Floor, Room 641
> > > 144 College Street
> > > Toronto ON, M5S 3M2
> > > e: n.mitsakakis at theta.utoronto.ca
> <mailto:n.mitsakakis at theta.utoronto.ca>
> > <mailto:n.mitsakakis at theta.utoronto.ca
> <mailto:n.mitsakakis at theta.utoronto.ca>>
> > <mailto:n.mitsakakis at theta.utoronto.ca
> <mailto:n.mitsakakis at theta.utoronto.ca>
> > <mailto:n.mitsakakis at theta.utoronto.ca
> <mailto:n.mitsakakis at theta.utoronto.ca>>>
> > > t: (416) 946 - 3700 <tel:%28416%29%20946%20-%203700>
> <tel:%28416%29%20946%20-%203700>
> > > f: (416) 946 - 3719 <tel:%28416%29%20946%20-%203719>
> <tel:%28416%29%20946%20-%203719>
> > > w: www.theta.utoronto.ca <http://www.theta.utoronto.ca>
> <http://www.theta.utoronto.ca>
> > <http://www.theta.utoronto.ca>
> >
> >
> >
> >
> > --
> > Nicholas Mitsakakis, MSc, PhD
> > Biostatistician
> > Toronto Health Economics and Technology Assessment (THETA)
> Collaborative
> > Assistant Professor
> > Leslie Dan Faculty of Pharmacy, University of Toronto
> > 6th Floor, Room 641
> > 144 College Street
> > Toronto ON, M5S 3M2
> > e: n.mitsakakis at theta.utoronto.ca
> <mailto:n.mitsakakis at theta.utoronto.ca>
> <mailto:n.mitsakakis at theta.utoronto.ca
> <mailto:n.mitsakakis at theta.utoronto.ca>>
> > t: (416) 946 - 3700 <tel:%28416%29%20946%20-%203700>
> > f: (416) 946 - 3719 <tel:%28416%29%20946%20-%203719>
> > w: www.theta.utoronto.ca <http://www.theta.utoronto.ca>
> <http://www.theta.utoronto.ca>
>
>
>
>
> --
> Nicholas Mitsakakis, MSc, PhD
> Biostatistician
> Toronto Health Economics and Technology Assessment (THETA) Collaborative
> Assistant Professor
> Leslie Dan Faculty of Pharmacy, University of Toronto
> 6th Floor, Room 641
> 144 College Street
> Toronto ON, M5S 3M2
> e: n.mitsakakis at theta.utoronto.ca <mailto:n.mitsakakis at theta.utoronto.ca>
> t: (416) 946 - 3700
> f: (416) 946 - 3719
> w: www.theta.utoronto.ca <http://www.theta.utoronto.ca>
More information about the R-sig-mixed-models
mailing list