Description Usage Arguments Examples
Fit a series of models with different ks to data, and select the k value based on DIC.
1 2 3 4 5 | find_k(model = c("poisson", "negbinom", "cmp", "Tpoisson", "Tnegbinom",
"Tcmp"), count, ks = 0:5, type = 0, model_par = list(Xc = NA, Xz =
NA, Xrc = NA, Xrz = NA, maxiter = 50, size_upper = 100),
jags_par = list(chain = 2, sample = 1, thin = 5, method = "rjparallel",
burnin = 500, inits = inix, dic.sample = 1000))
|
model |
character string, partially matched to c('poisson', 'negbinom', 'cmp', 'Tpoisson','Tnegbinom', 'Tcmp'): see 'Details'. |
ks |
numeric vector of integers. |
type |
numeric value, specifying the type of regression model: 0: no covariates; 1: with covariates; 2: with covariates and random effects. Defaults to |
model_par |
list of model parameters. |
jags_par |
list of variables to pass to run.jags function. |
data |
numeric vector of counts. |
1 | x = find_k('pois', legion) # Find k-aggregated zero-inflated Poisson model to the Legionnaires data
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.