Page 1 of 1

building formula using strings

Posted: Wed Aug 09, 2023 11:18 pm
by r_samin
I want to build a loop that receives number of required lags and returns the regression formula based on that In Eviews 12
i.e. lag=3 : y c x(-1) x(-2) x(-3) and then I want to feed it to my regression analysis.

So I was thinking of using a loop that constructs this formula in the format of strings based on the lags determined. How can I then feed it to the command F(Y).regtype [string] ?

Re: building formula using strings

Posted: Sat Aug 19, 2023 11:10 pm
by r_samin
if someone could help me with this question i will really appreciate it. my formulas need 15+ lags inclucded (and it varies) if I always need to input manually it takes lots of time and leave room for input errors. So I need to give the number of lags and receive an autoregressive formula based on that

Re: building formula using strings

Posted: Sun Aug 20, 2023 8:06 am
by EViews Gareth