[R] difference percentile R vs SPSS

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu Nov 8 13:30:02 CET 2012


On Thu, Nov 8, 2012 at 12:17 PM, David A. <dasolexa at hotmail.com> wrote:

> In R:
>
>> normal200<-rnorm(200,0,1)

 You forgot set.seed(310366) so we can reproduce your random numbers exactly.

> I think the main difference is that SPSS only calculates critical values within the range of values in the data, while R fits a normal and calculates the critical value using the fitted distribution. This is more obvious if the size of the data is much lower:

 Is SPSS just estimating the 95th percentile from your data?
Regardless of any distribution? Like R's quantile(normal20,0.95)? I
get much closer answers to your SPSS using R for that, and I suspect
one of the 9 quantile algorithms will give an exact answer (unless
SPSS uses something else entirely).

 Whereas qnorm in R is giving you the 95th percentile of a Normal
distribution with a given mean and sd.

Barry




More information about the R-help mailing list