Page 1 of 1
How to generate new series based on existing ones
Posted: Fri Apr 29, 2016 1:34 am
by Alan.R.
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!
Re: How to generate new series based on existing ones
Posted: Fri Apr 29, 2016 2:00 am
by EViews Gareth
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 %
This doesn't make sense. I think you're missing some words or something.
You'll have to explain in more detail.
Re: How to generate new series based on existing ones
Posted: Mon May 02, 2016 3:14 am
by Alan.R.
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.
Re: How to generate new series based on existing ones
Posted: Mon May 02, 2016 3:27 am
by Alan.R.
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.
Re: How to generate new series based on existing ones
Posted: Mon May 02, 2016 4:10 am
by EViews Gareth
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.
Re: How to generate new series based on existing ones
Posted: Mon May 02, 2016 1:02 pm
by Alan.R.
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.
If I am using this sample already for regressions, isnt it better to generate new series?
Mind is unstructured/undated.
Re: How to generate new series based on existing ones
Posted: Mon May 02, 2016 1:09 pm
by startz
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
Posted: Thu May 05, 2016 10:05 am
by Alan.R.
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
Re: How to generate new series based on existing ones
Posted: Thu May 05, 2016 10:16 am
by EViews Gareth
Make a new sample with a different name.
Re: How to generate new series based on existing ones
Posted: Thu May 05, 2016 10:17 am
by startz
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
Assuming you have set up the workfile with a panel structure, so that EViews knows which company is which, you want to do something like
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
Posted: Thu May 05, 2016 3:10 pm
by Alan.R.
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
Assuming you have set up the workfile with a panel structure, so that EViews knows which company is which, you want to do something like
Code: Select all
sample highequity if equity>1.05*equity(-1)
sample highdebt if debt>1.05*debt(-1)
Sadly despite my best effors, I imported my excel file as an unstructrued panel. What is the code then
Re: How to generate new series based on existing ones
Posted: Thu May 05, 2016 3:13 pm
by startz
Perhaps something like
Code: Select all
sample highequity if equity>1.05*equity(-1) and company=company(-1)