Each number in the below list resides in a quantile. When put in order, there are 10 numbers, so the first is in the 0.1 quantile, the second in the 0.2 etc.
Lets say we have 10 examples of systolic blood pressure from 30 year olds: 104,95,106,105,110,150,101,98,85,104 This is a random sample. What I want to do is in R, calculate the corresponding quantiles from a normal distribution with the same mean and variance as the sample. So, using the same mean and variance as the above random sample, create a normal distribution. From this normal distribution, I want to calculate 10 corresponding quantiles. Then, I want to plot a qqplot of both data sets to see the distribution. One person told me to do this: qnorm(c(0.25,0.5,0.75),mean=mean(x),sd=sd(x)) Output: [1] 3.76997 5.50000 7.23003 ...But this does not give me 10 corresponding quantiles? Another person told me to do this: > > > x=c(104,95,106,105,110,150,101,98,85,104) > > > n=length(x) > > > p=(1:n-0.5)/n > > > z=qnorm(p, mean(x), sd(x),)[order(order(x))] But this seems to generate 10 new numbers. And not give corresponding quantiles from a normal distribution. Any ideas? Please help! Thanks. _________________________________________________________________ Celeb spotting Play CelebMashup and win cool prizes [[alternative HTML version deleted]]
______________________________________________ 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.