"Jacques Wagnor" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
> I have a model as follows: > > x <- replicate(100, sum(rlnorm(rpois(1,5), 0,1))) > y <- quantile(x, 0.99)) > > How would one go about estimating the boundaries of a 95% confidence > interval for y? > > Any pointers would be greatly appreciated. I'm not a statistician, so giving the answer in terms of extreme value statistics is beyond me, but the R Team gives us a (sharp) tool. quantile(x,99) is returning the midpoint of the 99th and 100th elements of the sorted 100 element vector you created. If you repeat that process 1000 times, sort again, and pick the 25th and the 975th points, you can pull the 0.025 and 97.5 percentile points from the simulated distribution. Obviously an estimate and will vary depending on the seed. Here's what I got after that process: > sort(y1000.df$midpt)[25] [1] 20.8424 > sort(y1000.df$midpt)[1000-25] [1] 47.47615 -- David Winsemius ______________________________________________ R-help@r-project.org 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.