Skip to content

access the se of a forecast

6 messages · plocq, Rui Barradas

#
Hi everybody,

I am currently trying to forecast some double seasonal time series by using
the function dshw. I want to access the standard errors to build the
confident interval for my forecast. I am using to following code :

fit<-dshw(eem,period1=7,period2=48,h=48)

then by using summary(fit), I see that my se are contained in the vector :
$s20
but when I call fit$s20, I get NULL.

I don't understand why this happens. How should I proceed to get these se?

By advance, thank you very much for your help!

--
View this message in context: http://r.789695.n4.nabble.com/access-the-se-of-a-forecast-tp4628847.html
Sent from the R help mailing list archive at Nabble.com.
#
Hello,

Many people mistake 'summary' for a special kind of print function.
At least I did, at first.
The fact is that 'summary' does it's own computations and outputs the result
of those computations, to be printed by the appropriate print method.

Simply put, what you need is

summary(fit)$s20

or

sfit <- summary(fit)
sfit$s20

Hope this helps,

Rui Barradas

plocq wrote
--
View this message in context: http://r.789695.n4.nabble.com/access-the-se-of-a-forecast-tp4628847p4628876.html
Sent from the R help mailing list archive at Nabble.com.
#
Thank you very much for your answer. I didn't know this.
However, I tried what you suggest and it doesn't work either : 
- by typing summary(fit)$s20, I get exactly what I had with summary(fit)
and
- by typing sfit<-summary(fit) and then sfit$s20, I get NULL...
these facts seem very strange to me.


--
View this message in context: http://r.789695.n4.nabble.com/access-the-se-of-a-forecast-tp4628847p4628912.html
Sent from the R help mailing list archive at Nabble.com.
#
Hello,

You're right, sorry for the misleading (general purpose) information.

fit$model$s20

(The object can be inspected with names(fit) and then print each of the
components or names(fit$model).)

Rui Barradas

plocq wrote
--
View this message in context: http://r.789695.n4.nabble.com/access-the-se-of-a-forecast-tp4628847p4629023.html
Sent from the R help mailing list archive at Nabble.com.
#
What am I thinking about?

Objects should be inspected with str(object)

R.B.

Rui Barradas wrote
--
View this message in context: http://r.789695.n4.nabble.com/access-the-se-of-a-forecast-tp4628847p4629034.html
Sent from the R help mailing list archive at Nabble.com.