Description Usage Arguments References Examples
Bayesian prediction of the model, Z_i = Y_{t_i} + ε_i, dY_t = b(φ,t,Y_t)dt + γ \widetilde{s}(t,Y_t)dW_t.
1 2 3 4 5 |
object |
class object of MCMC samples: "est.hiddenDiffusion", created with method |
t |
vector of time points to make predictions for |
burnIn |
burn-in period |
thinning |
thinning rate |
b.fun.mat |
matrix-wise definition of drift function (makes it faster) |
which.series |
which series to be predicted, new one ("new") or further development of current one ("current") |
M2pred |
optional, if current series to be predicted and t missing, |
cand.length |
length of candidate samples (if method = "vector") |
pred.alg |
prediction algorithm, "Distribution", "Trajectory", "simpleTrajectory" or "simpleBayesTrajectory" |
sample.length |
number of samples to be drawn, default is the number of posterior samples |
grid |
fineness degree of sampling approximation |
plot.prediction |
if TRUE, prediction intervals are plotted |
Hermann, S. (2016a). BaPreStoPro: an R Package for Bayesian Prediction of Stochastic Processes. SFB 823 discussion paper 28/16.
Hermann, S. (2016b). Bayesian Prediction for Stochastic Processes based on the Euler Approximation Scheme. SFB 823 discussion paper 27/16.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
model <- set.to.class("hiddenDiffusion", parameter = list(phi = 5, gamma2 = 1, sigma2 = 0.1))
t <- seq(0, 1, by = 0.01)
data <- simulate(model, t = t)
est_hiddiff <- estimate(model, t, data$Z, 100) # nMCMC should be much larger!
plot(est_hiddiff)
pred_hiddiff <- predict(est_hiddiff, t = seq(0, 1, by = 0.1))
pred_hiddiff2 <- predict(est_hiddiff, which.series = "current")
pred_hiddiff <- predict(est_hiddiff, pred.alg = "simpleTrajectory", sample.length = 100)
pred_hiddiff <- predict(est_hiddiff, pred.alg = "simpleBayesTrajectory")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.