Obtain certain cross-section fixed effects constant

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

brianleblanc
Posts: 3
Joined: Wed May 02, 2018 8:02 am

Obtain certain cross-section fixed effects constant

I've run a number of panel regressions in a loop, and I'm looking for a way to programmatically grab the FE contants.

I know that the following produces a table of the fixed effects constants.

Code: Select all

`equation LRLR.ls Y = C(1) + C(2)*XLR.effects `

Which for me produces a table like:

PROV Effect
1 ALBERTA 2.668232
2 B_COLUMb 1.730889
3 MANITOBA 1.205979
4 NBRUNSWK 0.225447
5 NFOUNLND -1.567084
6 NORTHWT -3.864254
7 NOVA_SCO 0.348455
8 NUNAVUT -3.607152
9 ONTARIO 3.806506
10 PRINCE_E -2.239777
11 QUEBEC 3.078946
13 YUKON -2.712531

What I need is for a way to write the following string, for example:

"Y,ALBERTA = " @str(C(1)) + @str(2.668232) + @str(c(2)) + "*X, ALBERTA"

Where ALBERTA and 2.668232 come from the FE table above. I then need to iterate over B_COLUMB, MANITOBA, etc etc.

I can handle the iteration portion, I just don't know how to grab the info from LR.effects table

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

Re: Obtain certain cross-section fixed effects constant

Freeze it into a table object, then grab the contents from that frozen object.

brianleblanc
Posts: 3
Joined: Wed May 02, 2018 8:02 am

Re: Obtain certain cross-section fixed effects constant

How to I obtain the string values in the table?

For example, @val(table(2,2)) produces NA but I need it to produce ALBERTA

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

Re: Obtain certain cross-section fixed effects constant

Don't use @val.

Code: Select all

`%a = table(2,2)`