Learn R Programming

MARSS (version 3.11.9)

print.marssPredict: Printing function for MARSS Predict objects

Description

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.

Usage

# S3 method for marssPredict
print(x, ...)

Value

A print out of the predictions as a data frame.

Arguments

x

A marssPredict object.

...

Other arguments for print. Not used.

Author

Eli Holmes, NOAA, Seattle, USA.

Examples

Run this code
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")

Run the code above in your browser using DataLab