Thanks, Spencer, for spending time on my question.

On Dec 5, 2006, at 1:48 AM, Spencer Graves wrote:

>      No, your example computation does NOT produce the desired "lme  
> prediction intervals".  I ran your script and got exactly the same  
> numbers for upper and lower limits.  Even without any consideration  
> of statistical theory, this suggests either shockingly precise  
> statistical estimation or a problem with your algorithm.

There may have been a typo in what I sent to the list.
The following script produces prediction intervals that are not  
nearly as shocking as intervals with 0 width:

library(mlmRev)
library(nlme)
hsb.lme <- lme(mAch ~ minrty * sector, random = ~ 1 | cses, Hsb82)
(hsb.int <- intervals(hsb.lme))
hsb.new <- data.frame(
      minrty = rep(c('No', 'Yes'), 2),
      sector = rep(c('Public', 'Catholic'), each = 2))
cbind(hsb.new, predict(hsb.lme, hsb.new, level = 0))

cbind(hsb.new, rbind(
     hsb.int[[1]][1,],
     hsb.int[[1]][1,] + hsb.int[[1]][2,],
     hsb.int[[1]][1,] + hsb.int[[1]][3,],
     hsb.int[[1]][1,] + hsb.int[[1]][2,] + hsb.int[[1]][3,] + hsb.int 
[[1]][4,]
))

The latter produces:
   minrty   sector     lower      est.    upper
1     No   Public 12.467015 12.712155 12.95730
2    Yes   Public  6.657422  7.387386  8.11735
3     No Catholic 14.522224 15.123113 15.72400
4    Yes Catholic 10.062856 11.821924 13.58099

<snip>

>      To briefly outline some of the difficulties, we first should  
> ask if you want confidence intervals for the MEAN of future values  
> or for the future values themselves?

I want the former, and that's what I think I computed.

> And how do you want to handle the random effects?  If you want the  
> mean of the fixed effects, averaging over random effects, that  
> should be fairly easy.

Exactly. And my question is --- if the CIs I obtained were correct  
--- is there a less laborious way to obtain them?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/



        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to