Description Usage Arguments Value Author(s) References See Also Examples
inla
performs a
full Bayesian analysis of additive models using Integrated Nested
Laplace approximation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | inla(
formula,
family = "gaussian",
contrasts = NULL,
data,
quantiles=c(0.025, 0.5, 0.975),
E = NULL,
offset=NULL,
scale = NULL,
weights = NULL,
Ntrials = NULL,
strata = NULL,
link.covariates = NULL,
verbose = FALSE,
lincomb = NULL,
control.compute = list(),
control.predictor = list(),
control.family = list(),
control.inla = list(),
control.results = list(),
control.fixed = list(),
control.mode = list(),
control.expert = list(),
control.hazard = list(),
control.lincomb = list(),
control.update = list(),
only.hyperparam = FALSE,
inla.call = inla.getOption("inla.call"),
inla.arg = inla.getOption("inla.arg"),
num.threads = inla.getOption("num.threads"),
keep = inla.getOption("keep"),
working.directory = inla.getOption("working.directory"),
silent = inla.getOption("silent"),
debug = inla.getOption("debug"),
.parent.frame = parent.frame()
)
|
formula |
A |
family |
A string indicating the likelihood
family. The default is |
contrasts |
Optional contrasts for the fixed
effects; see |
data |
A data frame or list containing the variables in the model. The data frame MUST be provided |
quantiles |
A vector of quantiles, p(0), p(1),… to compute for each posterior marginal. The function returns, for each posterior marginal, the values x(0), x(1),… such that Prob(X<x)=p |
E |
Known component in the mean for the Poisson likelihoods defined as E exp(eta) where eta is the linear
predictor. If not provided it is set to |
offset |
This argument is used to specify an
a-priori known and fixed component to be included in
the linear predictor during fitting. This should be
|
scale |
Fixed (optional) scale parameters of the precision for Gaussian and Student-T response models. Default value is rep(1, n.data). |
weights |
Fixed (optional) weights parameters of
the likelihood, so the log-likelihood[i] is changed into
weights[i]*log-likelihood[i]. Default value is rep(1,
n.data). Due to the danger of mis-interpreting the results (see below), this option is DISABLED
by default. You can enable this option for the rest of your |
Ntrials |
A vector containing the number of
trials for the |
strata |
Fixed (optional) strata indicators for tstrata likelihood model. |
link.covariates |
A vector or matrix with covariates for link functions |
verbose |
Boolean indicating if the |
lincomb |
Used to define linear combination of
nodes in the latent field. The posterior distribution
of such linear combination is computed by the
|
control.compute |
See |
control.predictor |
See
|
control.family |
See |
control.inla |
See |
control.results |
See |
control.fixed |
See |
control.mode |
See |
control.expert |
See |
control.hazard |
See |
control.lincomb |
See |
control.update |
See |
only.hyperparam |
A boolean variable saying if only the hyperparameters should be computed. This option is mainly used internally. (TODO: This option should not be located here, change it!) |
inla.call |
The path to, or the name of, the
|
inla.arg |
A string indicating ALL arguments to the 'inla' program and do not include default arguments. (OOPS: This is an expert option!) |
num.threads |
Maximum number of threads the
|
keep |
A boolean variable indicating that the
working files (ini file, data files and results
files) should be kept. If TRUE and no
|
working.directory |
A string giving the name of an non-existing directory where to store the working files. |
silent |
If equal to 1L or TRUE, then the
|
debug |
If |
.parent.frame |
Internal use only |
inla
returns an object of class "inla"
. This is a list
containing at least the following arguments:
summary.fixed |
Matrix containing the mean and standard deviation (plus, possibly quantiles and cdf) of the the fixed effects of the model. |
marginals.fixed |
A list containing the posterior marginal densities of the fixed effects of the model. |
summary.random |
List of matrices containing the mean and
standard deviation (plus, possibly quantiles and cdf) of the
the smooth or spatial effects defined through |
marginals.random |
If
|
summary.hyperpar |
A matrix containing the mean and sd (plus, possibly quantiles and cdf) of the hyperparameters of the model |
marginals.hyperpar |
A list containing the posterior marginal densities of the hyperparameters of the model. |
summary.linear.predictor |
A matrix containing the mean and sd (plus, possibly quantiles and cdf) of the linear predictors η in the model |
marginals.linear.predictor |
If |
summary.fitted.values |
A matrix containing the mean and
sd (plus, possibly quantiles and cdf) of the fitted values
g^{-1}(η) obtained by transforming the linear
predictors by the inverse of the link function. This quantity
is only computed if |
marginals.fitted.values |
If |
summary.lincomb |
If |
marginals.lincomb |
If |
joint.hyper |
A matrix containing the joint density of the hyperparameters (in the internal scale) |
dic |
If |
cpo |
If |
po |
If |
waic |
If |
mlik |
If |
neffp |
Expected effective number of parameters in the model. The standard deviation of the expected number of parameters and the number of replicas for parameter are also returned |
mode |
A list of two elements: |
call |
The matched call. |
formula |
The formula supplied |
nhyper |
The number of hyperparameters in the model |
cpu.used |
The cpu time used by the |
Havard Rue hrue@math.ntnu.no and Sara Martino
Rue, H. and Martino, S. and Chopin, N. (2009) Approximate Bayesian Inference for latent Gaussian models using Integrated Nested Laplace Approximations, JRSS-series B (with discussion), vol 71, no 2, pp 319-392. Rue, H and Held, L. (2005) Gaussian Markov Random Fields - Theory and Applications Chapman and Hall
1 2 3 4 | ## Not run:
##See the web page \url{www.r-inla.org} for a series of worked out examples
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.