[R] pvalues
Uwe Ligges
ligges at statistik.uni-dortmund.de
Wed Dec 10 08:43:15 CET 2003
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
More information about the R-help
mailing list