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