Sorting groups after quantiles

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

jessisam
Posts: 12
Joined: Thu May 07, 2009 2:51 am

Sorting groups after quantiles

Postby jessisam » Thu May 07, 2009 3:30 am

Hi.
I have a dated pandel data set that I have created several groups out of. I would like to sort all these groups for the 25% smalles observatings in Group 1, then I would like to sort for the next 25% in Group 1... etc. in accending order. How do I do this in Eviews?
Really thankful for all help!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Sorting groups after quantiles

Postby EViews Gareth » Thu May 07, 2009 8:55 am

Hi.

Unfortunately I have no clear indication of what you're trying to do. Could you be a bit more clear?

jessisam
Posts: 12
Joined: Thu May 07, 2009 2:51 am

Re: Sorting groups after quantiles

Postby jessisam » Thu May 07, 2009 10:47 am

Ok. So I have a data set containing information on 10.000 firms over items like "assets", "debt", "net income, "dividend"... etc reported from 1994 - 2006 for each firm:

Example:

Yr Comp Assets Debt NetIncome Div ...
95 1 260 54 150 20
96 1 200 50 60 15
95 2 700 200 520 250
96 2 710 210 500 250
... etc

I would like to see how all these items (groups: assets, debt, net income, dividend...) look (descriptive statistics) when taking just the 25% smallest observations within the asset group, then taking the next 25% smallest observations within the asset group, all the way up to the 25% largest observations within the asset group. This is what I want to investigate for all these items. Simply looking at the characteristics of the firms with lowest assets, how their debtlevel is, how their dividend policy look like... etc.

I'm very thankful for your help :)

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Sorting groups after quantiles

Postby startz » Thu May 07, 2009 12:15 pm

Ok. So I have a data set containing information on 10.000 firms over items like "assets", "debt", "net income, "dividend"... etc reported from 1994 - 2006 for each firm:

Example:

Yr Comp Assets Debt NetIncome Div ...
95 1 260 54 150 20
96 1 200 50 60 15
95 2 700 200 520 250
96 2 710 210 500 250
... etc

I would like to see how all these items (groups: assets, debt, net income, dividend...) look (descriptive statistics) when taking just the 25% smallest observations within the asset group, then taking the next 25% smallest observations within the asset group, all the way up to the 25% largest observations within the asset group. This is what I want to investigate for all these items. Simply looking at the characteristics of the firms with lowest assets, how their debtlevel is, how their dividend policy look like... etc.

I'm very thankful for your help :)

Code: Select all

smpl if asset<@quantile(asset,.25)
then do whatever you want for the first 25%, etc.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Sorting groups after quantiles

Postby EViews Glenn » Thu May 07, 2009 1:24 pm

Do you want the quantiles within the asset group, or the firm specific quantiles within the asset group?

jessisam
Posts: 12
Joined: Thu May 07, 2009 2:51 am

Re: Sorting groups after quantiles

Postby jessisam » Fri May 08, 2009 10:55 pm

I think it is the firm specific quantiles within the asset group I want, as I want to look at the features like debt level, dividendlevel... etc within the first quantile (of observations) within the asset group. The compare it to the second, third and fourth quantile (of observations) within the asset group.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Sorting groups after quantiles

Postby EViews Glenn » Mon May 11, 2009 6:28 am

If you want the firm specific, you should look at using @quantilesby instead of @quantiles...

jessisam
Posts: 12
Joined: Thu May 07, 2009 2:51 am

Re: Sorting groups after quantiles

Postby jessisam » Tue Jun 09, 2009 7:21 am

If I perform this command [smpl if x<@quantile(x,.25)] I get the 0% - 25 % smallest observation for this group. If I then want the 25% - 50% smallest observations within this same group, how do I do that? If I use the qutoe: [smpl if x<@quantile (x,.5)] I get the 0% - 50% smallest observations, but what I want is the 25% - 50% smallest observations. I also need then the next 50% - 75% , and then the next 75% - 100%.

So if I have 4000 companies, I should have 1000 companies in each group. In the first group(0%-25%) the 1000 smallest company reports, and in accending order getting the next 1000... up to the last group (75%-100%) with the 1000 largest company reports. Is there any quote that performs this?

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Sorting groups after quantiles

Postby startz » Tue Jun 09, 2009 7:33 am

If I perform this command [smpl if x<@quantile(x,.25)] I get the 0% - 25 % smallest observation for this group. If I then want the 25% - 50% smallest observations within this same group, how do I do that? If I use the qutoe: [smpl if x<@quantile (x,.5)] I get the 0% - 50% smallest observations, but what I want is the 25% - 50% smallest observations. I also need then the next 50% - 75% , and then the next 75% - 100%.

Code: Select all

smpl if x>=@quantile(x,.25)] and x<@quantile (x,.5)


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests