spinar_penal_val {spINAR} | R Documentation |
Validated penalized semiparametric estimation of INAR models
Description
Semiparametric penalized estimation of the autoregressive parameters and the innovation distribution of INAR(p
) models,
\code{p} \in \{1,2\}
. The estimation is conducted by maximizing the penalized conditional likelihood of the model.
Included is a possible validation of one or both penalization parameters. If no validation is wanted, the function coincides
to the spinar_penal function of this package.
Usage
spinar_penal_val(
x,
p,
validation,
penal1 = NA,
penal2 = NA,
over = NA,
folds = 10,
init1 = 1,
init2 = 1,
progress = TRUE
)
Arguments
x |
[ |
p |
[ |
validation |
[ |
penal1 |
[ |
penal2 |
[ |
over |
[ |
folds |
[ |
init1 |
[ |
init2 |
[ |
progress |
[ |
Value
If validation = FALSE
, the function returns a vector containing the penalized estimated coefficients
\code{alpha}_1,...,\code{alpha}_p
and the penalized 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 validation = TRUE
, the function returns a named list, where the first entry contains
the penalized estimated coefficients \code{alpha}_1,...,\code{alpha}_p
and the penalized 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
. The second (and if over = both
also the third entry) contain(s) the validated penalization parameter(s).
Examples
# generate data
dat1 <- spinar_sim(n = 50, p = 1, alpha = 0.5,
pmf = c(0.3, 0.3, 0.2, 0.1, 0.1))
# penalized semiparametric estimation with validation over L1
spinar_penal_val(x = dat1, p = 1, validation = TRUE, penal2 = 0.1,
over = "L1")
# penalized semiparametric estimation with validation over both L1 and L2
spinar_penal_val(x = dat1, p = 1, validation = TRUE, over = "both")