| logL_inad_i | R Documentation |
Returns the time i contribution, summed over subjects, for the no fixed effect model.
logL_inad_i(
y,
i,
order = 1,
thinning = c("binom", "pois", "nbinom"),
innovation = c("pois", "bell", "nbinom"),
alpha,
theta,
nb_inno_size = NULL
)
y |
Integer matrix n_sub by n_time. |
i |
Time index in 1..ncol(y). |
order |
Integer in {0, 1, 2}. |
thinning |
One of "binom", "pois", "nbinom". |
innovation |
One of "pois", "bell", "nbinom". |
alpha |
Thinning parameters. For order 1, numeric length 1 or n_time. For order 2, either a matrix n_time by 2 or a list(alpha1, alpha2). |
theta |
Innovation parameter at time i, or a vector length 1 or n_time.
For Poisson and negative binomial innovations, this is the innovation
mean. For Bell innovations, this is the Bell rate parameter
(mean |
nb_inno_size |
Size parameter for innovation "nbinom". Numeric length 1 or n_time. |
A scalar log likelihood contribution for time i.
set.seed(1)
y <- simulate_inad(
n_subjects = 50,
n_time = 5,
order = 1,
thinning = "binom",
innovation = "pois",
alpha = 0.3,
theta = 2
)
fit <- fit_inad(y, order = 1, thinning = "binom", innovation = "pois", max_iter = 20)
logL_inad_i(
y = y,
i = 3,
order = 1,
thinning = "binom",
innovation = "pois",
alpha = fit$alpha,
theta = fit$theta
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.