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!
Sorting groups after quantiles
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Sorting groups after quantiles
Hi.
Unfortunately I have no clear indication of what you're trying to do. Could you be a bit more clear?
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
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 :)
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
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)-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Sorting groups after quantiles
Do you want the quantiles within the asset group, or the firm specific quantiles within the asset group?
Re: Sorting groups after quantiles
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
If you want the firm specific, you should look at using @quantilesby instead of @quantiles...
Re: Sorting groups after quantiles
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?
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
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)Who is online
Users browsing this forum: No registered users and 2 guests
