Description Usage Arguments Value Examples
This function allows you to adjust multiple Bayesian GLM models with predictors subjected to a limit of detection (LOD) specified with a BUGS-language description of the prior distribution, and a set of data.
1 2 3 4 5 | glmLimits(formula, data, LimitVariables, lod = NULL, loq = NULL,
family = "gaussian", logLimit = FALSE, n.iter = 1000, n.chains = 1,
alpha.corrected = 0.05, quantiles = unique(c(alpha.corrected/2, 0.025,
0.975, 1 - (alpha.corrected/2))), quiet = FALSE, progress.bar = "text",
dic.type = "popt", n.adapt = 1000, ...)
|
formula |
an object of class "formula": a symbolic description of the model to be fitted. |
data |
a data.frame containing the variables in the model. |
LimitVariables |
character string of names of the variables subjected to a limit. |
lod |
numeric vector with the same length of LimitVariables containing the lower limit values for the variables with LOD (with the same order). |
loq |
optional numeric vector with the same length of LimitVariables containing the upper limit values for the variables with limits (with the same order) |
family |
character with a description of the error distribution to be used in the model. Possible values are "gaussian" (default) for continuous outcomes or "binomial" for binary outcomes. |
logLimit |
a logical indicating if limit variables would be assumed distributed as log-normal. |
n.iter |
number of iterations of the Markov chain to run to be used in rjags::update(), rjags::coda.samples() and rjags::dic.samples(). |
n.chains |
the number of parallel chains for the model to be used in rjags::jags.model(). |
alpha.corrected |
significance level to be used for the confident intervals. |
quantiles |
numeric vector containing the percentiles in [0,1] to obtain of the estimated parameters. |
progress.bar |
type of progress bar. Possible values are "text" (default), "gui", and "none" to be used in rjags::update(). |
dic.type |
type of penalty to use in rjags::dic.samples(). |
n.adapt |
the number of iterations for adaptation to be used in rjags::jags.model(). If n.adapt = 0 then no adaptation takes place. |
It returns an object of class "glmLimits" containing a model of class "jags".
1 | glmLimits(formula, data, LimitVariables, lod = NULL, loq = NULL, family = "gaussian", logLimit = FALSE, n.iter = 1000, n.chains = 1, alpha.corrected = 0.05, quantiles = unique(c(alpha.corrected/2, 0.025, 0.975, 1-(alpha.corrected/2))), quiet = FALSE, progress.bar = "text", dic.type = "popt", n.adapt = 1000, ...)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.