Deciles
Posted: Thu Oct 23, 2008 11:31 am
I have series that contains "na"s and I am looking to find what decile each observation falls into. The series undated. Any help would be appreciated
Code: Select all
series quantiles
for !i=10 to 1 step -1
smpl if x<@quantile(x,!i/10)
quantiles = !i
next
smpl @all
Here's an easier method...use the series "Proc/Generate by Classification". Choose Method = "Quantile Values" and enter "10" as your number of quantiles. We'll create a new series containing the quantiles.I have series that contains "na"s and I am looking to find what decile each observation falls into. The series undated. Any help would be appreciated