View source: R/predict_history.R
predict_history | R Documentation |
Computes predicted cumulative history using fitted model. This is just a wrapper
for predict(object, summary, probs, full_length, predict_history=history_type)
.
predict_history(
object,
history_type,
summary = TRUE,
probs = NULL,
full_length = TRUE,
...
)
object |
An object of class cumhist |
history_type |
|
summary |
Whether summary statistics should be returned instead of
raw sample values. Defaults to |
probs |
The percentiles used to compute summary, defaults to NULL (no CI). |
full_length |
Only for |
... |
Unused |
If summary=FALSE
, a numeric matrix iterationsN x clearN.
If summary=TRUE
but probs=NULL
a vector of requested cumulative history values.
If summary=TRUE
and probs
is not NULL
, a data.frame
with a column "Predicted" (mean) and a column for each specified quantile.
fit_cumhist
, predict.cumhist
br_fit <- fit_cumhist(br_singleblock, state = "State", duration = "Duration")
history_difference_summary <- predict_history(br_fit, "difference")
# full posterior prediction samples
history_difference <- predict_history(br_fit,
"difference",
summary = FALSE,
full_length = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.