Prediction for a regression model dependent on a Poisson process

Description

Bayesian prediction of a regression model y_i = f(t_i, N_{t_i}, θ) + ε_i with N_t\sim Pois(Λ(t, ξ)), ε_i\sim N(0,γ^2\widetilde{s}(t)).

Usage

1
2
3
4
5
6
## S4 method for signature 'est.jumpRegression'
predict(object, t, only.interval = TRUE,
  level = 0.05, burnIn, thinning, Lambda.mat, fun.mat,
  which.series = c("new", "current"), M2pred = 10, cand.length = 1000,
  pred.alg = c("Distribution", "simpleTrajectory", "simpleBayesTrajectory"),
  sample.length, grid = 1e-05, plot.prediction = TRUE)

Arguments

object

class object of MCMC samples: "est.jumpRegression", created with method estimate,jumpRegression-method

t

vector of time points to make predictions for

only.interval

if TRUE: only calculation of prediction intervals

level

level of the prediction intervals

burnIn

burn-in period

thinning

thinning rate

Lambda.mat

matrix-wise definition of intensity rate function (makes it faster)

fun.mat

matrix-wise definition of regression 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, M2pred variables will be predicted with the observation time distances

cand.length

length of candidate samples (if method = "vector"), for jump diffusion

pred.alg

prediction algorithm, "Distribution", "Trajectory", "simpleTrajectory" or "simpleTrajectory"

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

References

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
t <- seq(0,1, by = 0.01)
cl <- set.to.class("jumpRegression", fun = function(t, N, theta) theta[1]*t + theta[2]*N,
             parameter = list(theta = c(1,2), gamma2 = 0.1, xi = c(3, 1/4)),
             Lambda = function(t, xi) (t/xi[2])^xi[1])
data <- simulate(cl, t = t)
est <- estimate(cl, t, data, 1000)
plot(est)
## Not run: 
pred <- predict(est, Lambda.mat = function(t, xi) (t/xi[,2])^xi[,1],
                 fun.mat = function(t, N, theta) theta[,1]*t + theta[,2]*N)

## End(Not run)
pred <- predict(est, pred.alg = "simpleTrajectory", sample.length = 100)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.