Variabele age

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

Mathias
Posts: 7
Joined: Wed Mar 14, 2012 9:52 am

Variabele age

Postby Mathias » Thu Apr 05, 2012 12:46 pm

Hi,

I have a question concerning the creation of the variabele 'company' age, whereby the variable 'age' = 1 in the founding year.
I have listed the founding years of each company in an Excel sheet and I've imported them it into Eviews 7.

I've reshaped the excel data into panel data in Eviews. Now I have the variable 'year' (the time series of my observations are from 2001 - 2010) and the variable 'founding year' (the list of the founding years of the firms in my data).

I was told to generate a new variable 'company age' in Eviews, with the formula:
- Company age = year - founding year + 1

The problem is that I get the following results in Eviews:
728928.
729293.
729658.
730024.
730389.
730754.

This instead of the normal values for company ages: 9, 11, 89, ...

Does anyone know how I can adapt the formula in order to obtain normal age - numbers in Eviews?

This would be a really great help.

Thanks in advance

Mathias

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Variabele age

Postby EViews Gareth » Thu Apr 05, 2012 12:52 pm

It is probably the case that your year variable is a date, and your founding year variable is not. In which case:

Code: Select all

age = @datepart(year,"YYYY")-foundyear+1

Mathias
Posts: 7
Joined: Wed Mar 14, 2012 9:52 am

Re: Variabele age

Postby Mathias » Thu Apr 05, 2012 1:43 pm

You were right, the problem is solved.

Thank you very much!

Kind regards

Mathias


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests