I do: x<-rnorm(1000) quantile(x,c(.025,.975)) 2% 98% -1.844753 1.931762 Since I want to find a 95% confidence interval, I take the .025 and .975 quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%) points. Is it just rounding the printed 2% and 98%, or is it REALLY finding .02 and .98 points instead of .025 and .975? Thanks for any help. Bill Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
The experimental method:> x _ rnorm(1000) > quantile(x,c(0.02,0.025,0.975,0.98))2% 2% 98% 98% -1.824218 -1.782416 1.932281 2.013865 Looks like everything is OK. On Thu, 26 Feb 1998, Bill Simpson wrote:> I do: > x<-rnorm(1000) > quantile(x,c(.025,.975)) > 2% 98% > -1.844753 1.931762 > > Since I want to find a 95% confidence interval, I take the .025 and .975 > quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%) > points. Is it just rounding the printed 2% and 98%, or is it REALLY > finding .02 and .98 points instead of .025 and .975? > > Thanks for any help. > > Bill Simpson > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._.._._._._._._._._._._._._._._._ >Benjamin Bolker Dep't of Ecology and Evolutionary Biology, ben at eno.princeton.edu Princeton University tel: (609) 258-6886, fax: (609) 258-1334 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Bill Simpson <wsimpson at uwinnipeg.ca> writes:> > I do: > x<-rnorm(1000) > quantile(x,c(.025,.975)) > 2% 98% > -1.844753 1.931762 > > Since I want to find a 95% confidence interval, I take the .025 and .975 > quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%) > points. Is it just rounding the printed 2% and 98%, or is it REALLY > finding .02 and .98 points instead of .025 and .975?It's rounding... At the end of the quantile function, you'll see: names(qs) <- paste(round(100 * probs), "%", sep = "") qs } Maybe we should put in an extra argument for controlling the precision of the rounding? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Thanks everyone for the help. Bill Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._