ar1_NegBinom | R Documentation |
Fits a simple AR1 negative binomial model. Let Y_1, \ldots, Y_N
be
the N
random variables representing observed data
y_1^*, \ldots y_N^*
, respectively. The model assumes that
Y_n|Y_{n-1}
for some n \in 1:N
has the following distribution:
Y_n | Y_{n - 1} = y_{n-1}* \sim NB(a + by_{n-1}^*, \psi)
Where a, b
and \psi
are model parameters that need to be
estimated.
ar1_NegBinom(
data,
init,
start_vals = c(10, 0.5, 1),
transform = TRUE,
a = 2,
...
)
data |
The data to fit, numeric vector. |
init |
Initial value |
start_vals |
Starting values for the parameters |
transform |
Boolean, whether or not to use variable transformations in the optimization |
a |
Only used if |
... |
other parameters to be passed into the |
Missing values are currently ignored.
An AR1_NegBinom model
ar1_NegBinom(round(sunspot.year), init = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.