avg_coverage_arima {tsPI} | R Documentation |
Compute the average coverage of the prediction intervals computed by
naive plug-in method and arima_pi
Description
Computes expected coverage probabilities of the prediction intervals of ARMA process by simulating time series from the known model.
Usage
avg_coverage_arima(
phi = NULL,
theta = NULL,
d = 0,
n,
n_ahead = 1,
nsim2,
nsim = 100,
level = 0.95,
prior = "uniform",
return_all_coverages = FALSE,
...
)
Arguments
phi |
vector containing the AR parameters |
theta |
vector containing the MA parameters |
d |
degree of differencing |
n |
length of the time series |
n_ahead |
length of the forecast horizon |
nsim2 |
number of simulations used in computing the expected coverage |
nsim |
number of simulations used in importance sampling |
level |
desired coverage probability of the prediction intervals |
prior |
prior to be used in importance sampling. Multiple choices are allowed. |
return_all_coverages |
return raw results i.e. coverages for each simulations. When |
... |
additional arguments to |
Value
a list containing the coverage probabilities
See Also
Examples
## Not run:
set.seed(123)
# takes a while, notice se, increase nsim2 to get more accurate results
avg_coverage_arima(phi = 0.9, n = 50, n_ahead = 10, nsim2 = 100)
avg_coverage_arima(phi = 0.9, theta = -0.6, n = 50, n_ahead = 10, nsim2 = 100)
## End(Not run)
[Package tsPI version 1.0.4 Index]