Page 1 of 1

Sorting groups after quantiles

Posted: Thu May 07, 2009 3:30 am
by jessisam
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!

Re: Sorting groups after quantiles

Posted: Thu May 07, 2009 8:55 am
by EViews Gareth
Hi.

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

Re: Sorting groups after quantiles

Posted: Thu May 07, 2009 10:47 am
by jessisam
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 :)

Re: Sorting groups after quantiles

Posted: Thu May 07, 2009 12:15 pm
by startz
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.

Re: Sorting groups after quantiles

Posted: Thu May 07, 2009 1:24 pm
by EViews Glenn
Do you want the quantiles within the asset group, or the firm specific quantiles within the asset group?

Re: Sorting groups after quantiles

Posted: Fri May 08, 2009 10:55 pm
by jessisam
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.

Re: Sorting groups after quantiles

Posted: Mon May 11, 2009 6:28 am
by EViews Glenn
If you want the firm specific, you should look at using @quantilesby instead of @quantiles...

Re: Sorting groups after quantiles

Posted: Tue Jun 09, 2009 7:21 am
by jessisam
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?

Re: Sorting groups after quantiles

Posted: Tue Jun 09, 2009 7:33 am
by startz
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)