| f {INLA} | R Documentation |
Define general Gaussian models in the INLA formula
Description
Function used for defining of smooth and spatial terms within inla model
formulae. The function does not evaluate anything - it
exists purely to help set up a model. The function specifies one
smooth function in the linear predictor (see inla.list.models()) as
w\ f(x)
Usage
f(
...,
model = "iid",
copy = NULL,
scopy = NULL,
same.as = NULL,
n = NULL,
nrep = NULL,
replicate = NULL,
ngroup = NULL,
group = NULL,
control.group = inla.set.control.group.default(),
control.scopy = inla.set.control.scopy.default(),
hyper = NULL,
initial = NULL,
prior = NULL,
param = NULL,
fixed = NULL,
season.length = NULL,
constr = NULL,
extraconstr = list(A = NULL, e = NULL),
values = NULL,
cyclic = NULL,
diagonal = NULL,
graph = NULL,
graph.file = NULL,
cdf = NULL,
quantiles = NULL,
Cmatrix = NULL,
rankdef = NULL,
Z = NULL,
nrow = NULL,
ncol = NULL,
nu = NULL,
bvalue = NULL,
spde.prefix = NULL,
spde2.prefix = NULL,
spde2.transform = c("logit", "log", "identity"),
spde3.prefix = NULL,
spde3.transform = c("logit", "log", "identity"),
mean.linear = inla.set.control.fixed.default()$mean,
prec.linear = inla.set.control.fixed.default()$prec,
compute = TRUE,
of = NULL,
precision = 10^8,
range = NULL,
adjust.for.con.comp = TRUE,
order = NULL,
scale = NULL,
rgeneric = NULL,
cgeneric = NULL,
scale.model = NULL,
args.slm = list(rho.min = NULL, rho.max = NULL, X = NULL, W = NULL, Q.beta = NULL),
args.ar1c = list(Z = NULL, Q.beta = NULL),
args.intslope = list(subject = NULL, strata = NULL, covariates = NULL),
vb.correct = TRUE,
locations = NULL,
debug = FALSE,
A.local = NULL
)
Arguments
... |
Name of the covariate and, possibly of the weights vector. NB: order counts!!!! The first specified term is the covariate and the second one is the vector of weights (which can be negative). |
model |
A string indicating the chosen model. The
default is |
copy |
The name of the model-component to copy |
scopy |
The name of the model-component to smooth-copy (where the copy-function is a spline) |
same.as |
Can be used with |
n |
An optional argument which defines the dimension
of the model if this is different from
|
nrep |
Number of replications, if not given, then |
replicate |
A vector of which replications to use. |
ngroup |
Number of groups, if not given, then |
group |
A vector of which groups to use. |
control.group |
Controls the use of |
control.scopy |
Controls the use of |
hyper |
Specification of the hyperparameter, fixed or
random, initial values, priors and its parameters. See
|
initial |
THIS OPTION IS OBSOLETE, DO NOT USE |
prior |
THIS OPTION IS OBSOLETE, DO NOT USE |
param |
THIS OPTION IS OBSOLETE, DO NOT USE |
fixed |
THIS OPTION IS OBSOLETE; DO NOT USE |
season.length |
Length of the seasonal component for |
constr |
A boolean variable indicating whater to set a sum to 0 constraint on the term. By default the sum to 0 constraint is imposed on all intrinsic models ("iid","rw1","rw1","besag", etc..). |
extraconstr |
This argument defines extra linear
constraints. The argument is a list with two elements, a
matrix |
values |
An optional vector giving all values
assumed by the covariate for which we want estimated the
effect. It must be a numeric vector, a vector of factors
or |
cyclic |
A boolean specifying wheather the model is cyclical. Only valid for "rw1" and "rw2" models, is cyclic=T then the sum to 0 constraint is removed. For the correct form of the grah file see Martino and Rue (2008). |
diagonal |
An extra constant added to the diagonal of the precision matrix to prevent numerical issues. |
graph |
Defines the graph-object either as a file with
a graph-description, an |
graph.file |
THIS OPTION IS OBSOLETE, DO NOT USE |
cdf |
THIS OPTION IS OBSOLETE, DO NOT USE |
quantiles |
A vector of maximum 10 quantiles,
|
Cmatrix |
The specification of the precision matrix
for the generic, generic3 or z models (up to a scaling constant).
|
rankdef |
A number defining the rank deficiency of the model, with sum-to-zero constraint and possible extra-constraints taken into account. See details. |
Z |
The matrix for the z-model |
nrow |
Number of rows for 2d-models |
ncol |
Number of columns for 2d-models |
nu |
Smoothing parameter for the Matern2d-model,
possible values are |
bvalue |
The boundary conditions for model |
spde.prefix |
Internal use only |
spde2.prefix |
Internal use only |
spde2.transform |
Internal use only |
spde3.prefix |
Internal use only |
spde3.transform |
Internal use only |
mean.linear |
Prior mean for |
prec.linear |
Prior precision for |
compute |
A boolean variable indicating whether the
marginal posterior distribution for the nodes in the
|
of |
Internal use only |
precision |
The precision for the artificial noise added when creating a copy of a model and others. |
range |
A vector of size two giving the lower and
upper range for the scaling parameter |
adjust.for.con.comp |
If TRUE (default), adjust some of the models (currently: besag, bym, bym2 and besag2) if the number of connected components in graph is larger than 1. If FALSE, do nothing. |
order |
Defines the |
scale |
A scaling vector. Its meaning depends on the model. |
rgeneric |
A object of class |
cgeneric |
A object of class |
scale.model |
Logical. If |
args.slm |
Required arguments to the model="slm"; see the documentation for further details. |
args.ar1c |
Required arguments to the model="ar1c"; see the documentation for further details. |
args.intslope |
A list with the |
vb.correct |
Add this model component to the list of nodes to be used for the (potential) vb correction? If |
locations |
A matrix with locations for the model |
debug |
Enable local debug output |
A.local |
Local A-matrix (experimental and in development, do not use) |
Details
There is no default value for rankdef, if it
is not defined by the user then it is computed by the rank
deficiency of the prior model (for the generic model, the
default is zero), plus 1 for the sum-to-zero constraint if the
prior model is proper, plus the number of extra
constraints. Oops: This can be wrong, and then the user
must define the rankdef explicitly.
Value
TODO
Author(s)
Havard Rue hrue@r-inla.org