How to generate new series based on existing ones
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
How to generate new series based on existing ones
Hi there. I am using EViews 9. I need help with the following issue:
I have a working file with yearly observations and 2 variables - first I have the names of companies and second I have the amount of their total assets. I need to generate 2 new series where
1) only those observations where companies increased their assets by at least 5 %
2) only those observations where companies decreased their assets by at least 5 %
I do not know the command to do that. Furthermore, lets say that in row 5 I have company Apple which has 1000 assets and in row 6 I have Google with 2000 assets. Even if Google has more than 5 % more assets than Apple, since they are different companies I do not want that. How can I tackle this?
Thank you very much in advance!
I have a working file with yearly observations and 2 variables - first I have the names of companies and second I have the amount of their total assets. I need to generate 2 new series where
1) only those observations where companies increased their assets by at least 5 %
2) only those observations where companies decreased their assets by at least 5 %
I do not know the command to do that. Furthermore, lets say that in row 5 I have company Apple which has 1000 assets and in row 6 I have Google with 2000 assets. Even if Google has more than 5 % more assets than Apple, since they are different companies I do not want that. How can I tackle this?
Thank you very much in advance!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13602
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to generate new series based on existing ones
This doesn't make sense. I think you're missing some words or something.I need to generate 2 new series where
1) only those observations where companies increased their assets by at least 5 %
2) only those observations where companies decreased their assets by at least 5 %
You'll have to explain in more detail.
Re: How to generate new series based on existing ones
Lets say we have the following data:
Identifier showing company and year Total Assets
1)Apple Inc 2010 150
2)Apple Inc 2011 165
3)Apple Inc 2012 166
4)Apple Inc 2013 120
5)Google Inc 1990 500
6)Google Inc 1991 650
7)Google Inc 1992 750
8)Google Inc 1993 754
9)Google Inc 1994 595
I want only the observations in which total assets increased or decreased by more than 5 % (relative to total assets in the previous year) to remain, i.e. I only want observations 2, 4, 6, 7 and 9 to be generated as new series. Note that between 4 and 5 the increase is also more than 5 % but since they are different companies I do not want observation 5 to be in my new data series.
Identifier showing company and year Total Assets
1)Apple Inc 2010 150
2)Apple Inc 2011 165
3)Apple Inc 2012 166
4)Apple Inc 2013 120
5)Google Inc 1990 500
6)Google Inc 1991 650
7)Google Inc 1992 750
8)Google Inc 1993 754
9)Google Inc 1994 595
I want only the observations in which total assets increased or decreased by more than 5 % (relative to total assets in the previous year) to remain, i.e. I only want observations 2, 4, 6, 7 and 9 to be generated as new series. Note that between 4 and 5 the increase is also more than 5 % but since they are different companies I do not want observation 5 to be in my new data series.
Re: How to generate new series based on existing ones
My assignment is basically this: Perform a regression on firms that raised a significant amount of common equity (equity at time t >1,05equity at time t-1) with firms that raised a significant amount of straight debt (total debt at time t >1,05total debt at time t-1)
The second regression should compare firms that repurchased a significant amount of common equity with firms that retired a significant amount of straight debt.
In my above message I gave total assets as an example what needs to be done. The logic is the same, the real variables though are equity and debt, not total assets.
The second regression should compare firms that repurchased a significant amount of common equity with firms that retired a significant amount of straight debt.
In my above message I gave total assets as an example what needs to be done. The logic is the same, the real variables though are equity and debt, not total assets.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13602
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to generate new series based on existing ones
Creating a new series makes no sense. Simply set the sample to be the observations you're interested in.
How you set the sample depends on how the data are structured in your workfile.
How you set the sample depends on how the data are structured in your workfile.
Re: How to generate new series based on existing ones
If I am using this sample already for regressions, isnt it better to generate new series?Creating a new series makes no sense. Simply set the sample to be the observations you're interested in.
How you set the sample depends on how the data are structured in your workfile.
Mind is unstructured/undated.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: How to generate new series based on existing ones
A regression only uses the observations in the current sample. So if you have defined the sample you want there's no need to define new variables.
Re: How to generate new series based on existing ones
A regression only uses the observations in the current sample. So if you have defined the sample you want there's no need to define new variables.
Ok, so how do I make what I need? Preferable a new sample with another name
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13602
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to generate new series based on existing ones
Make a new sample with a different name.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: How to generate new series based on existing ones
Assuming you have set up the workfile with a panel structure, so that EViews knows which company is which, you want to do something likeA regression only uses the observations in the current sample. So if you have defined the sample you want there's no need to define new variables.
Ok, so how do I make what I need? Preferable a new sample with another name
Code: Select all
sample highequity if equity>1.05*equity(-1)
sample highdebt if debt>1.05*debt(-1)Re: How to generate new series based on existing ones
Sadly despite my best effors, I imported my excel file as an unstructrued panel. What is the code thenAssuming you have set up the workfile with a panel structure, so that EViews knows which company is which, you want to do something likeA regression only uses the observations in the current sample. So if you have defined the sample you want there's no need to define new variables.
Ok, so how do I make what I need? Preferable a new sample with another nameCode: Select all
sample highequity if equity>1.05*equity(-1) sample highdebt if debt>1.05*debt(-1)
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: How to generate new series based on existing ones
Perhaps something like
Code: Select all
sample highequity if equity>1.05*equity(-1) and company=company(-1)Who is online
Users browsing this forum: No registered users and 2 guests
