predict.dynrModel | R Documentation |
predict
method for dynrModel
objectspredict
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"), ...)
object |
a dynrModel object from which predictions are desired |
newdata |
an optional |
interval |
character indicating what kind of intervals are desired. 'none' gives no intervals, 'confidence', gives confidence intervals, 'prediction' gives prediction intervals. |
method |
character the method used to create the forecasts. See details. |
level |
the confidence or predictions level, ignored if not using intervals |
type |
character the type of thing you want predicted: latent variables or manifest variables. |
... |
further named arguments, e.g., |
The newdata
argument is either a data.frame
or ts
object. It passed as the dataframe
argument of dynr.data
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.