Deciles
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Deciles
Something along the lines of this should work.
Code: Select all
series quantiles
for !i=10 to 1 step -1
smpl if x<@quantile(x,!i/10)
quantiles = !i
next
smpl @all
Follow us on Twitter @IHSEViews
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: Deciles
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
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.
By default we will apply a value map to the resulting output series so that you'll see the ranges for the quantile bins in the default display, but the underlying quantile numbers are there in the series. You can either delete the Valmap specification from the procedure, or turn off the display of the valmap in the resulting series by selecing "Raw data" in the combo in the series toolbar.
Who is online
Users browsing this forum: No registered users and 22 guests