[R-sig-ME] confidence intervals for random slopes
Lenth, Russell V
russell-lenth at uiowa.edu
Mon Aug 11 23:55:30 CEST 2014
CIs for the slopes in the fixed part may be obtained easily via the lsmeans package:
fm <- lme(Y ~ X * fixfactor, random=~X|randomfactor)
require("lsmeans")
lstrends(fm, "fixfactor", var="X")
You may also obtain pairwise comparisons by calling 'pairs' with the result of the last statement
Russell V. Lenth - Professor Emeritus
Department of Statistics and Actuarial Science
The University of Iowa - Iowa City, IA 52242 USA
Voice (319)335-0712 (Dept. office) - FAX (319)335-3017
-----Original Message-----
Message: 1
Date: Sun, 10 Aug 2014 16:14:57 +0200 (CEST)
From: Bokony Veronika <bokony.veronika at agrar.mta.hu>
Dear all,
let me ask your advice about calculating confidence intervals for random slopes. I have a random intercept & random slope model like this:
lme(Y ~ X * fixfactor, random=~X|randomfactor)
where randomfactor has 9 levels. For each of these 9 levels, I can calculate the slope of X from the fixed and random effect estimates. I would like to add some measure of uncertainty to each of these 9 estimates, i.e. an SE or CI for each random slope. The random effects SD which is given by the lme summary output is not what I'm interested in. I got a very general tip that I could calculate credible intervals from posterior distributions using a bayesian approach, but I found no evident way of extracting these from MCMCglmm either.
I would be very grateful for any working example that can achieve this.
Best regards,
Veronika
Veronika B?kony PhD
"Lend?let" Evolutionary Ecology Research Group Plant Protection Institute, Centre for Agricultural Research Hungarian Academy of Sciences Herman Ott? ?t 15.
H-1022 Budapest, Hungary
+36 1 3918609
http://www.nki.hu/lendulet-evolucios-okologiai-kutatocsoport
http://ornithology.limnologia.hu/people/veronika-bokony/
More information about the R-sig-mixed-models
mailing list