| print.marssPredict | R Documentation |
MARSS() outputs marssMLE objects. predict(object), where object is marssMLE object, will return the predictions of y(t) or the smoothed value of 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")