How to generate new series based on existing ones

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

Alan.R.
Posts: 10
Joined: Fri Apr 29, 2016 1:27 am

How to generate new series based on existing ones

Postby Alan.R. » Fri Apr 29, 2016 1:34 am

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!

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

Postby EViews Gareth » Fri Apr 29, 2016 2:00 am

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.

Alan.R.
Posts: 10
Joined: Fri Apr 29, 2016 1:27 am

Re: How to generate new series based on existing ones

Postby Alan.R. » Mon May 02, 2016 3:14 am

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.

Alan.R.
Posts: 10
Joined: Fri Apr 29, 2016 1:27 am

Re: How to generate new series based on existing ones

Postby Alan.R. » Mon May 02, 2016 3:27 am

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.

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

Postby EViews Gareth » Mon May 02, 2016 4:10 am

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.

Alan.R.
Posts: 10
Joined: Fri Apr 29, 2016 1:27 am

Re: How to generate new series based on existing ones

Postby Alan.R. » Mon May 02, 2016 1:02 pm

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.

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

Postby startz » Mon May 02, 2016 1:09 pm

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.

Alan.R.
Posts: 10
Joined: Fri Apr 29, 2016 1:27 am

Re: How to generate new series based on existing ones

Postby Alan.R. » Thu May 05, 2016 10:05 am

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

Postby EViews Gareth » Thu May 05, 2016 10:16 am

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

Postby startz » Thu May 05, 2016 10:17 am

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)

Alan.R.
Posts: 10
Joined: Fri Apr 29, 2016 1:27 am

Re: How to generate new series based on existing ones

Postby Alan.R. » Thu May 05, 2016 3:10 pm

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

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

Postby startz » Thu May 05, 2016 3:13 pm

Perhaps something like

Code: Select all

sample highequity if equity>1.05*equity(-1) and company=company(-1)


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests