Hello,
I hope this isn't too elementary of a question, but I am having some problems getting fitted values out of an equation.
I estimate an equation using sample period A to period C,
I then set my workfile sample from period A to period B,
Then I get the fitted values from my equation.
My problem is that the fitted values between periods B and C are now forced to being the actual values ... is this done on purpose for some reason?
Going back to my equation output and viewing the actual/fitted/residual table does show the truly fitted values for all periods between A and C, so I don't see why replacing some fitted values with actual values because of the workfile sample would be done on purpose...
A related question: if I do this command, myeq.fit(f="na") myfitted, doesn't this mean that all observations outside the sample used for the equation estimation are supposed to be "NA" ? I still get actual values placed into the series myfitted.
Thanks in advance,
-cap
Help with fitted values
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13584
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Help with fitted values
Could you provide more detail on what "Then I get the fitted values from my equation." means? How are you getting the fitted values?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13584
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Help with fitted values
A related question: if I do this command, myeq.fit(f="na") myfitted, doesn't this mean that all observations outside the sample used for the equation estimation are supposed to be "NA" ? I still get actual values placed into the series myfitted.
-cap
Remove the quotes. The command should be myeq.fit(f=na)
Re: Help with fitted values
Ah, ok thanks, the (f=na) option does work now. An error message would be nice for a syntax error like that, I guess I will post that in the wish list board.
My command for fitted values is just this: myeq.fit myfitted.
It seems that the fitted value series that is created depends on the workfile sample. And, in the scenario I mentioned earlier, actual values will be inserted for certain observations even though fitted values from the estimation also exist for those same observations. Is this done on purpose for some reason? Seems like it would lead to erroneous fitted values in my opinion.
Thanks very much.
-cap
My command for fitted values is just this: myeq.fit myfitted.
It seems that the fitted value series that is created depends on the workfile sample. And, in the scenario I mentioned earlier, actual values will be inserted for certain observations even though fitted values from the estimation also exist for those same observations. Is this done on purpose for some reason? Seems like it would lead to erroneous fitted values in my opinion.
Thanks very much.
-cap
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13584
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Help with fitted values
Yes, by design both the fit and the forecast commands (and indeed 99% of commands in EViews) apply to the current workfile sample.
The fit command is really used to produce a static forecast. It just so happens that if you do a static forecast over the original estimation sample, you can generate fitted values. However there are more general uses for static forecasts other than generating fitted values, and thus allowing the user to specify the sample over which the forecast takes place is desirable.
The fit command is really used to produce a static forecast. It just so happens that if you do a static forecast over the original estimation sample, you can generate fitted values. However there are more general uses for static forecasts other than generating fitted values, and thus allowing the user to specify the sample over which the forecast takes place is desirable.
Re: Help with fitted values
Ok, I guess that makes more sense ... so, would you say there is any other more preferred way to store fitted values into a series?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13584
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Help with fitted values
No, the .fit command is probably the best way to do it - just make sure to set the sample before doing it.
Re: Help with fitted values
is there any way to program repetition of storing fitted values from a number of equations (say 100)? so after I ran 100 equations (eq{!i}) I would have 100 myfitted{!i} variables.
Thanks
Thanks
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13584
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Help with fitted values
Use the fit command in a program to generate the fitted variables.
Who is online
Users browsing this forum: No registered users and 2 guests
