Description Usage Arguments Value Author(s) References Examples
View source: R/pmpp_predInterval.R
Produces prediction intervals for Posterior Mean Panel Predictor model by means of resampling with replacement from model's residuals. Block Bootstrap method takes into account heteroskedasticity of the error terms, both across units and over time. Block window is chosen randomly.
1 2 | pmpp_predinterval(model, fframe, boot_reps = 1000, block_size = NULL,
confidence = 0.95, iter = NULL)
|
model |
PMPP model, as returned by |
fframe |
|
boot_reps |
integer; number of bootstrap replications |
block_size |
integer; width of the re-sampled block of residuals |
confidence |
numeric in (0,1); confidence level of the interval |
iter |
iterating constant, to be used in a loop when extraction from call is needed |
A data.frame
with panel indices, lower and upper bounds and midpoint.
Michal Oleszak
Oleszak, M. (2018). "Forecasting sales with micro-panels: Empirical Bayes approach. Evidence from consumer goods sector.", Erasmus University Thesis Repository
1 2 3 4 5 6 7 | ## Not run: data(EmplUK, package = "plm")
EmplUK <- dplyr::filter(EmplUK, year %in% c(1978, 1979, 1980, 1981, 1982))
pmpp_model <- pmpp(dep_var = "emp", data = EmplUK)
my_fframe <- create_fframe(EmplUK, 1983:1985)
intervals <- pmpp_predinterval(pmpp_model, my_fframe, boot_reps = 10)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.