print.marssPredict | R Documentation |
MARSS()
outputs marssMLE
objects. predict(object)
, where object is marssMLE
object, will return the predictions of \mathbf{y}_t
or the smoothed value of \mathbf{x}_t
for h
steps past the end of the model data. predict(object)
returns a marssPredict
object which can be passed to print.marssPredict()
for automatic printing.
## S3 method for class 'marssPredict'
print(x, ...)
x |
A |
... |
Other arguments for print. Not used. |
A print out of the predictions as a data frame.
Eli Holmes, NOAA, Seattle, USA.
dat <- t(harborSealWA)
dat <- dat[2:4,] #remove the year row
fit <- MARSS(dat, model=list(R="diagonal and equal"))
# 2 steps ahead forecast
predict(fit, type="ytT", n.ahead=2)
# smoothed x estimates with intervals
predict(fit, type="xtT")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.