Description Usage Arguments Details Value Author(s) See Also
This function is still in beta development. Not exported in version 3.5. Computes the expected values of states (X component) and observations (Y component) for MARSS models fit with MARSS
. A list of newdata
, which includes the inputs (e.g. c and d in a marxss model) must be passed in if they are included in the model. Optionally data (Y) can be passed in in newdata
. This can be the original data or new data and can have missing values. To simulate data, use simulate.marssMLE
.
1 2 3 4 5 6 7 8 9 10 |
object |
A marssMLE object |
... |
Not used. |
n.ahead |
Number of time steps ahead to predict (starting from |
t.start |
A what t to start the prediction relative to the start (t=1) of the data to which the model was fit. The default is to start at t=T+1, where T is the length of the data to which the model was fit. For example, if TT=10, t.start=1 and n.ahead = 5, prediction is for time steps 1, 2, 3, 4, 5 so is not past the end of the data. |
newdata |
Data (explanatory variables) to be used for prediction if included in the model. |
se.fit |
Logical: should standard errors of prediction be returned? |
prediction.intervals |
Logical. Whether to return prediction intervals. Calculation of prediction intervals can be slow (if |
param.gen |
"MLE" or "hessian". Default="hessian". The perdiction interval calculation requires samples of the parameters from their estimated distribution. You can generate these via the estimated Hessian matrix (fast but assumes normality) or via parametric bootstrapped (terribly slow). |
nboot |
Number of bootstrapped parameter sequences to generate for the prediction interval calculation. |
verbose |
If TRUE, the boot straps used for the prediction interval calculation are returned. |
newdata
needs to be consistent with the model fitted. Thus if the model included inputs (in X or Y component) then these must also be included in newdata
and have the proper size and form. If newdata$data
is not passed in, then data (Y component) are assumed to be all missing and the expected values of the data (Ys) will be returned. The data is assumed to be all missing even if t.start
is less than T and thus the prediction period overlaps the data to which the model was fit. If that data should be included in the predictions, then it must be passed in in newdata
. The number of time steps in components of newdata
must be consistent with n.ahead
.
Prediction of the state (X) component is via the Kalman smoother (i.e. conditioned on all the data, if there is any) using MARSSkf
. Prediction of the observation (Y) component is via MARSShatyt
, and is also smoothed (i.e. conditioned on all the data, if there is any). The standard errors of prediction exclude the uncertainty in the estimation of the model parameters. You could use bootstrapping via MARSSboot
if you wanted to include that.
E.x |
A matrix of the expected values of the states (X) given |
E.y |
A matrix of the expected values of the observations (Y) given |
x.se |
A matrix of the estimated standard errors of the X predictions. |
y.se |
A matrix of the estimated standard errors of the Y predictions. |
newdata |
The |
pred.MLEobj |
The |
pred.MLEobj |
The |
pred.MLEobj |
The |
Eli Holmes and Eric Ward, NOAA, Seattle, USA.
eli(dot)holmes(at)noaa(dot)gov, eric(dot)ward(at)noaa(dot)gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.