| spinar_boot {spINAR} | R Documentation |
(Semi)parametric INAR bootstrap procedure
Description
INAR bootstrap procedures for the semiparametric and the parametric INAR setting, where the latter allows for moment- and maximum likelihood-based estimation and Poisson, geometrically and negative binomially distributed innovations.
Usage
spinar_boot(
x,
p,
B,
setting,
type = "mom",
distr = "poi",
M = 100,
level = 0.05,
progress = TRUE
)
Arguments
x |
[ |
p |
[ |
B |
[ |
setting |
[ |
type |
[ |
distr |
[ |
M |
[ |
level |
[ |
progress |
[ |
Value
[named list] with entries
x_star[
matrix] of bootstrap observations withlength(x)rows andBcolumns.parameters_star[
matrix] of bootstrap estimated parameters withBrows. Ifsetting = "sp", each row contains the estimated coefficients\code{alpha}_1,...,\code{alpha}_pand the estimated entries of the pmf\code{pmf}_0, \code{pmf}_1, ... where\code{pmf}_irepresents the probability of an innovation being equal toi. Ifsetting = "p", each row contains the estimated coefficients\code{alpha}_1,...,\code{alpha}_pand the estimated parameter(s) of the innovation distribution.bs_ci_percentile[
named matrix] with the lower and upper bounds of the bootstrap percentile confidence intervals for each parameter inparameters_star.bs_ci_hall[
named matrix] with the lower and upper bounds of Hall's bootstrap percentile confidence intervals for each parameter inparameters_star.
Examples
# generate data
dat1 <- spinar_sim(n = 200, p = 1, alpha = 0.5,
pmf = c(0.3, 0.3, 0.2, 0.1, 0.1))
dat2 <- spinar_sim(n = 200, p = 2, alpha = c(0.2, 0.3),
pmf = dgeom(0:60, 0.5))
# semiparametric INAR(1) bootstrap
spinar_boot(x = dat1, p = 1, B = 50, setting = "sp")
# parametric Geo-INAR(2) bootstrap using moment-based estimation
spinar_boot(x = dat2, p = 2, B = 50, setting = "p", type = "mom", distr = "geo")