Hi Everyone,
I try to delete the middle 50% of observations by only keeping the 25% lowest (Q1) and 25% highest (Q3) observations. I tried to make Quartiles by proc by classification but when I select 4 quartiles, i don't know how to delete the middel 50% oberservations. Is there an easy way to do this or do i have to use excel for this.
Thanks in advance,
Thomaaatke
Creating Quartiles (Q1 and Q3)
Moderators: EViews Gareth, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Creating Quartiles (Q1 and Q3)
Not sure what you mean by "delete", but here's some code that NAs the middle out.
Code: Select all
Series y = @recode(x<@quantile(x,0.25) or x>@quantile(x,0.75), x, na)
Follow us on Twitter @IHSEViews
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Creating Quartiles (Q1 and Q3)
something like
smpl if y<quantile(y,.25) or y>@quantile(y,.75)
smpl if y<quantile(y,.25) or y>@quantile(y,.75)
-
- Posts: 6
- Joined: Sat Apr 29, 2017 2:24 pm
Re: Creating Quartiles (Q1 and Q3)
Thanks a lot!
Return to “General Information and Tips and Tricks”
Who is online
Users browsing this forum: No registered users and 27 guests