Creating Dummy Variables - Help, please!

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

naetpenn
Posts: 7
Joined: Sat Feb 06, 2010 9:52 am

Creating Dummy Variables - Help, please!

Postby naetpenn » Sat Feb 06, 2010 10:10 am

Hello,

I am using the student version of eviews. I have firm-specific data(asset/debt ratio, ROE, book value) for two firms, BAC and GS. I want a dummy variable to be 1 for GS and 0 for BAC.

My question is this:
1. How do I create a dummy variable on EVIEWS for dum_GS=1 for GS and dum_GS=0 if not GS? If dum_gs=1, I want only GS firm-specific equation to be used in the equation, but if dum_GS=0 (in other words, if the firm was BAC), then I want only BAC firm-specific data to be utilized in the equation.

Thank you in advance.

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

Re: Creating Dummy Variables - Help, please!

Postby EViews Gareth » Sat Feb 06, 2010 12:02 pm

You'll have to describe your problem a little better...

What, in your data, differentiates the two firms?

naetpenn
Posts: 7
Joined: Sat Feb 06, 2010 9:52 am

Re: Creating Dummy Variables - Help, please!

Postby naetpenn » Sun Feb 07, 2010 9:03 am

I apologize for not specifying further.

If you can imagine that in an Excel spreadsheet:
column A: Date (from 2000-2009 until A40. Starting in A41, the exact same dates repeat until B79. )
Colmun B: Firm ("GS" all the way until B40. Starting in B41, "BAC" all the way until B79)
Column C: Credit spreads for GS all the way until C40. Starting in C41, credit spreads for BAC.
Column D-H: More firm specific data. The data until row 40 corresponds to GS, and the data past row 40 corresponds to BAC.

As you can see, the data above (and including) row 40 correspond to all data for GS. the data below 40 correspond to the data for BAC.

I want to run a VAR for credit spreads on the left hand side and firm specific data as well as lagged credit spreads data on the right hand side. I want to create a dummy variable on EVIEWS that is one for GS. I ONLY want GS specific data (data above row 40) to be included when GS=1. I want to see if the GS-specific data on the right hand side provides a good estimate of the left hand side variable, the credit spread of GS.

When GS=0, I want the data to reflect ONLY BAC data. Then, I want to be able to see how the right hand side variables of BAC-specific data provides an estimate of BAC stock prices.

I'm not sure if this makes sense. I just want to see how all the data I have for each bank can forecast the credit spreads for each specific bank.

Thank you in advance.

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

Re: Creating Dummy Variables - Help, please!

Postby EViews Gareth » Sun Feb 07, 2010 9:45 am

Just change the sample:

Code: Select all

smpl if firm = "GS"
will tell EViews to only include observations where the "firm" variable is equal to "GS"


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests