| spinar_boot | R Documentation |
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.
spinar_boot(
x,
p,
B,
setting,
type = "mom",
distr = "poi",
M = 100,
level = 0.05,
progress = TRUE
)
x |
[ |
p |
[ |
B |
[ |
setting |
[ |
type |
[ |
distr |
[ |
M |
[ |
level |
[ |
progress |
[ |
[named list] with entries
x_star[matrix] of bootstrap observations with
length(x) rows and B columns.
parameters_star[matrix] of bootstrap estimated
parameters with B rows.
If setting = "sp", each row contains
the estimated coefficients \code{alpha}_1,...,\code{alpha}_p and the
estimated entries of the pmf \code{pmf}_0, \code{pmf}_1, ... where
\code{pmf}_i represents the probability of an innovation being equal
to i.
If setting = "p", each row contains the estimated
coefficients \code{alpha}_1,...,\code{alpha}_p and 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 in parameters_star.
bs_ci_hall[named matrix] with the lower and
upper bounds of Hall's bootstrap percentile confidence intervals for each
parameter in parameters_star.
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.