[R] pvalues

Adaikalavan RAMASAMY ramasamya at gis.a-star.edu.sg
Wed Dec 10 10:44:52 CET 2003


If you want to generate a p-value, what is the null hypothesis ?

--
Adaikalavan Ramasamy 


-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Uwe Ligges
Sent: Wednesday, December 10, 2003 3:43 PM
To: Maya Sanders
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] pvalues


Maya Sanders wrote:
> dear all-
> If I have a vector of numbers (not necessarily
> normally distributed) how can I get the p-value of a
> number in this distribution.  I am interested in the "inverse" of 
> 'quantile' . thank you-
> Maya
> 


I'm not sure whether I got the point, but my guess is that you are 
trying to count how many observations in a vector x have values less 
than a and divide by the total number of observations in x, e.g.:

  x <- rnorm(20)
  a <- 0
  sum(x < a) / length(x)

Uwe Ligges

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list