Program lagged variables from a table
Posted: Sat Nov 14, 2020 10:42 am
Hi there,
I have a table of lags for variables, and I wish to be able to incorporate into my program a way to pull the value of the lag from the table, and into my program that will result in regressions. If you were using excel it would be some form of Index Match formula, but I don't know how to do this in EViews programming
This is the start of my program:
for %j dm
next
for %y 5y5y_be
next
for %p pmi
next
for %x liq
next
for %l1 -1
next
equation {%j}_{%y}_{%x}1.ls {%j}_{%y} c {%p} {%x}1({%l0})
table tab_{%j}_{%y}
tab_{%j}_{%y}(1,1) = "PMI co-eff"
tab_{%j}_{%y}(2,1) = {%j}_{%x}_{%y}1.@coef(2)
I have a table called tab_lags, which I would like the program to be able to go into, find the value of {%j}_{%y}_{%x}1, and then return the associated the lag value where I currently have %l1 -1.
Hopefully this makes sense, any comments/guidance most welcome.
Thanks!
Joe
I have a table of lags for variables, and I wish to be able to incorporate into my program a way to pull the value of the lag from the table, and into my program that will result in regressions. If you were using excel it would be some form of Index Match formula, but I don't know how to do this in EViews programming
This is the start of my program:
for %j dm
next
for %y 5y5y_be
next
for %p pmi
next
for %x liq
next
for %l1 -1
next
equation {%j}_{%y}_{%x}1.ls {%j}_{%y} c {%p} {%x}1({%l0})
table tab_{%j}_{%y}
tab_{%j}_{%y}(1,1) = "PMI co-eff"
tab_{%j}_{%y}(2,1) = {%j}_{%x}_{%y}1.@coef(2)
I have a table called tab_lags, which I would like the program to be able to go into, find the value of {%j}_{%y}_{%x}1, and then return the associated the lag value where I currently have %l1 -1.
Hopefully this makes sense, any comments/guidance most welcome.
Thanks!
Joe