good way to batch set add factors

For technical support, tips and tricks, suggestions, or any other information regarding the EViews model object.

Moderators: EViews Gareth, EViews Moderator

capuchin
Posts: 31
Joined: Tue Oct 15, 2019 9:06 am

good way to batch set add factors

Postby capuchin » Mon Nov 18, 2019 12:37 pm

I'm looking for a good way to
1) set a group of add factors so "that equation has no residuals at actuals"
2) make it so that the add factors for the sample are equal to the add factors that were in effect for a certain period. for example, if the add factor for GDP in 2019q3 was -2, I want to quickly (ie automatically via a program) make the add factor equal to -2 over the entire forecast period.

Any ideas?

EViews Matt
EViews Developer
Posts: 560
Joined: Thu Apr 25, 2013 7:48 pm

Re: good way to batch set add factors

Postby EViews Matt » Mon Nov 18, 2019 4:26 pm

Hello,

1) Take a look at the model object's addinit procedure.

2) For a single variable, something like the following will work. Introducing a loop will let you handle multiple add factors.

Code: Select all

!fill_value = GDP_A(@dtoo("2019q3"))
smpl 2019q4 @last   ' Replace with your forecast sample
GDP_A = !fill_value


Return to “Models”

Who is online

Users browsing this forum: No registered users and 11 guests