building formula using strings

For questions regarding programming in the EViews programming language.

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

r_samin
Posts: 5
Joined: Mon Jul 10, 2023 1:33 am

building formula using strings

Postby r_samin » Wed Aug 09, 2023 11:18 pm

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] ?

r_samin
Posts: 5
Joined: Mon Jul 10, 2023 1:33 am

Re: building formula using strings

Postby r_samin » Sat Aug 19, 2023 11:10 pm

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

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

Re: building formula using strings

Postby EViews Gareth » Sun Aug 20, 2023 8:06 am

Read through this:
viewtopic.php?f=5&t=1638
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 15 guests