FAQ/perc - CBU statistics Wiki

Revision 12 as of 2008-04-11 11:50:52

Clear message
location: FAQ / perc

How do I find out how many people have a score above a certain value?

Percentiles give the percentage of people who have a score below a threshold score.

Percentile (score) = 100 $$\frac{\mbox{n} \leq \mbox{score}}{\mbox{N}}$$

100 - Percentile (score) = 100 $$\frac{\mbox{n} \gt \mbox{score}}{\mbox{N}}$$

The percentiles for each score are routinely outputted using the frequency procedure in SPSS.

FREQUENCIES VAR=SCORE.
EXE.

In R the percentages of people with scores equal or below each observed score can be obtained by running

perc <- rep(-99,length(score))
a <- rep(-99,length(score))
ict <- 0
b <- duplicated(score)
ict <- ict+1
for (i in score) {
perc[i] <- 100*sum(score<=i)/length(score)
if (b[i] == FALSE) {
ict <- ict+1
a[ict] <- score[ict]
 }
 }
perc
a