predict.dynrModel {dynr}R Documentation

predict method for dynrModel objects


predict method for dynrModel objects


## S3 method for class 'dynrModel'
predict(object, newdata = NULL, interval = c("none",
  "confidence", "prediction"), method = c("kalman", "ensemble"),
  level = 0.95, type = c("latent", "observed"), ...)



a dynrModel object from which predictions are desired


an optional data.frame or ts object. See details.


character indicating what kind of intervals are desired. 'none' gives no intervals, 'confidence', gives confidence intervals, 'prediction' gives prediction intervals.


character the method used to create the forecasts. See details.


the confidence or predictions level, ignored if not using intervals


character the type of thing you want predicted: latent variables or manifest variables.


further named arguments, e.g., size for the ensemble size when using the ensemble prediction


The newdata argument is either a data.frame or ts object. It passed as the dataframe argument of and must accept the same further arguments as the data in the model passed in the object argument (e.g., same id, time, observed, and covariates arguments).

The available methods for prediction are 'kalman' and 'ensemble'. The 'kalman' method uses the Kalman filter to create predictions. The 'ensemble' method simulates a set of initial conditions and lets those run forward in time. The distribution of this ensemble provides the predictions. The mean is the value predicted. The quantiles of the distribution provide the intervals.


A list of the prediction estimates, intervals, and ensemble members.

[Package dynr version 0.1.16-27 Index]