My data is strictly positive (and zero values), and the output of a forecast should be only positive (and zero values) too.
My equation (simplified) looks something like this: y = 3 * x - 1 * z
So it's possible that a negative value arises if e.g. x is 0 and z is above 0.
But i don't want negative values, can i somehow specify that negative forecasts of y should be converted to 0?
Allow only non-negative forecast result values
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Allow only non-negative forecast result values
Perform the forecast, then recode it:
where yf is the name of your forecast series.
Code: Select all
yf = @recode(yf<0,0,yf)
Re: Allow only non-negative forecast result values
Thanks.
But i would also need the forecast evaluation under the condition that all negative values are zeros. Is it possible to somehow specify it in the estimation equation?
But i would also need the forecast evaluation under the condition that all negative values are zeros. Is it possible to somehow specify it in the estimation equation?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Allow only non-negative forecast result values
No. But you can always calculate the forecast evaluations yourself using the @mape, @rmse, @theil functions.
Re: Allow only non-negative forecast result values
Thanks i'll look it up.
Who is online
Users browsing this forum: No registered users and 2 guests
