# [R] lme predicted value confidence intervals

Colin cmeiklejohn at gmail.com
Wed Feb 6 21:01:49 CET 2008

```Dear R users,

Does anyone know of a way to obtain approximate 95% confidence intervals
for predicted values for factor levels of fixed effects from lme?  Our
goal is to use these intervals to interpret patterns across our
predicted values for certain factor levels.

Our mixed model has the following form with 7 levels of mtDNA, 2 levels
of autosome, 2 levels of brood and 2 levels of block,

> lme(fitness ~ mtDNA*autosome + brood, random = ~1 | block)

We have used the predict.lme function to obtain predicted values, but
are unsure how to obtain appropriate standard errors on these predicted
values.

Using predict.lme to predict "fitness" across a subset of our factor
levels (2 mtDNA, 2 autosome) generates the following output,

autosome   mtDNA brood block predict.fixed predict.block
1       ore     ore     A     A     0.4977047     0.5016255
2       ore simw501     A     A     0.4278287     0.4317495
3       ore     ore     B     A     0.5042857     0.5082065
4       ore simw501     B     A     0.4344098     0.4383306
5       ore     ore     A     B     0.4977047     0.4937839
6       ore simw501     A     B     0.4278287     0.4239079
7       ore     ore     B     B     0.5042857     0.5003649
8       ore simw501     B     B     0.4344098     0.4304890
9       aut     ore     A     A     0.5321071     0.5360279
10      aut simw501     A     A     0.4866497     0.4905705
11      aut     ore     B     A     0.5386882     0.5426090
12      aut simw501     B     A     0.4932308     0.4971516
13      aut     ore     A     B     0.5321071     0.5281863
14      aut simw501     A     B     0.4866497     0.4827289
15      aut     ore     B     B     0.5386882     0.5347674
16      aut simw501     B     B     0.4932308     0.4893099

We would like to calculate, for example, the appropriate 95% confidence
intervals for the predicted values of autosome=ore + mtDNA=ore,
autosome=ore + mtDNA=simw501, etc.

Sincerely,
Kristi Montooth and Colin Meiklejohn
Ecology and Evolutionary Biology
Brown University

```