Title: | Full Bayesian Analysis of Latent Gaussian Models using Integrated Nested Laplace Approximations |
---|---|
Description: | Full Bayesian analysis of latent Gaussian models using Integrated Nested Laplace Approximaxion. It is a front-end to the inla-program. |
Authors: | Havard Rue [cre, aut], Finn Lindgren [aut], Elias Teixeira Krainski [aut], Sara Martino [ctb], Haakon Bakka [ctb], Daniel Simpson [ctb], Andrea Riebler [ctb], Geir-Arne Fuglstad [ctb], Cristian Chiuchiolo [ctb] |
Maintainer: | Havard Rue <hrue@r-inla.org> |
License: | MIT + file LICENSE |
Version: | 25.04.10 |
Built: | 2025-06-28 21:27:16 UTC |
Source: | https://github.com/hrue/r-inla |
Package to perform full Bayesian analysis on latent Gaussian models using Integrated Nested Laplace Approximations.
See https://www.r-inla.org/ for further details.
INLA()
INLA()
Maintainer: Havard Rue hrue@r-inla.org
Authors:
Finn Lindgren finn.lindgren@gmail.com
Elias Teixeira Krainski elias@r-inla.org
Other contributors:
Sara Martino saramartino0@gmail.com [contributor]
Haakon Bakka bakka@r-inla.org [contributor]
Daniel Simpson dp.simpson@gmail.com [contributor]
Andrea Riebler andrea.riebler@math.ntnu.no [contributor]
Geir-Arne Fuglstad geirarne.fulgstad@gmail.com [contributor]
Cristian Chiuchiolo cristian.chiuchiolo@kaust.edu.sa [contributor]
sp
objects to inla.mesh.segment
objects.as.inla.mesh.segment(sp, ...) inla.sp2segment(sp, ...)
as.inla.mesh.segment(sp, ...) inla.sp2segment(sp, ...)
sp |
An |
... |
Additional arguments passed on to |
A inla.mesh.segment()
object, or a list of
inla.mesh.segment()
objects.
inla.sp2segment()
:
by
fmesher::fm_as_segm()
Finn Lindgren finn.lindgren@gmail.com
Data are taken from a meta-analysis to compare the utility of three types of diagnostic imaging - lymphangiography (LAG), computed tomography (CT) and magnetic resonance (MR) - to detect lymph node metastases in patients with cervical cancer. The dataset consists of a total of 46 studies: the first 17 for LAG, the following 19 for CT and the last 10 for MR.
BivMetaAnalysis
BivMetaAnalysis
A data frame with 92 observations on the following 9 variables.
a numeric vector
a numeric vector
a numeric vector
a numeric vector
a numeric vector
a numeric vector
a numeric vector
a numeric vector
a numeric vector
J. Scheidler and H. Hricak and K. K. Yu and L. Subak and M. R. Segal,"Radiological evaluation of lymph node metastases in patients with cervical cancer: a meta-analysis",JAMA 1997
data(BivMetaAnalysis)
data(BivMetaAnalysis)
~~ A concise (1-5 lines) description of the dataset. ~~
A data frame with 6690 observations on the following 4 variables.
Number of cases
a numeric vector
a numeric vector
a numeric vector
Rue, H and Held, L. (2005) Gaussian Markov Random Fields - Theory and Applications Chapman and Hall
A framework for defining latent models in C
inla.cgeneric.define(model = NULL, shlib = NULL, n = 0L, debug = FALSE, ...) inla.cgeneric.q(cmodel = NULL)
inla.cgeneric.define(model = NULL, shlib = NULL, n = 0L, debug = FALSE, ...) inla.cgeneric.q(cmodel = NULL)
model |
The name of the model function |
shlib |
Name of the compiled object-file with |
n |
The size of the model |
debug |
Logical. Turn on/off debugging |
... |
Additional arguments, required by |
cmodel |
The name of a cgeneric model-object (output from
|
Havard Rue hrue@r-inla.org
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.bgev( q.location = 0.5, q.spread = 0.25, q.mix = c(0.1, 0.2), beta.ab = 5L ) inla.set.control.bgev.default(...)
control.bgev( q.location = 0.5, q.spread = 0.25, q.mix = c(0.1, 0.2), beta.ab = 5L ) inla.set.control.bgev.default(...)
q.location |
The quantile level for the location parameter |
q.spread |
The quantile level for the spread parameter (must be < 0.5) |
q.mix |
The lower and upper quantile level for the mixing function |
beta.ab |
The parameters a and b in the Beta mixing function |
... |
Named arguments passed on to the main function |
The control.bgev
-list is set within the corresponding control.family
-list as control parameters to the family="bgev"
Other control:
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.compute( openmp.strategy = "default", hyperpar = TRUE, return.marginals = TRUE, return.marginals.predictor = FALSE, dic = FALSE, mlik = TRUE, cpo = FALSE, po = FALSE, waic = FALSE, residuals = FALSE, q = FALSE, config = FALSE, likelihood.info = FALSE, smtp = NULL, graph = FALSE, internal.opt = NULL, save.memory = NULL, control.gcpo = INLA::control.gcpo() ) inla.set.control.compute.default(...)
control.compute( openmp.strategy = "default", hyperpar = TRUE, return.marginals = TRUE, return.marginals.predictor = FALSE, dic = FALSE, mlik = TRUE, cpo = FALSE, po = FALSE, waic = FALSE, residuals = FALSE, q = FALSE, config = FALSE, likelihood.info = FALSE, smtp = NULL, graph = FALSE, internal.opt = NULL, save.memory = NULL, control.gcpo = INLA::control.gcpo() ) inla.set.control.compute.default(...)
openmp.strategy |
The computational strategy to use: 'small', 'medium', 'large', 'huge', 'default' and 'pardiso'. |
hyperpar |
A boolean variable if the marginal for the hyperparameters should be computed. Default TRUE. |
return.marginals |
A boolean variable if the marginals for the latent field should be returned (although it is computed). Default TRUE |
return.marginals.predictor |
A boolean variable if the marginals for the linear predictor should be returned (although it is computed). Default FALSE |
dic |
A boolean variable if the DIC-value should be computed. Default FALSE. |
mlik |
A boolean variable if the marginal likelihood should be computed.
Default |
cpo |
A boolean variable if the cross-validated predictive measures
(cpo, pit) should be computed (default |
po |
A boolean variable if the predictive ordinate should be computed
(default |
waic |
A boolean variable if the Watanabe-Akaike information criteria
should be computed (default |
residuals |
Provide estimates of |
q |
A boolean variable if binary images of the precision matrix, the reordered precision matrix and the Cholesky triangle should be generated. (Default FALSE.) |
config |
A boolean variable if the internal GMRF approximations be
stored. (Default |
likelihood.info |
A boolean variable to store likelihood-information or not.
This option requires |
smtp |
The sparse-matrix solver, one of 'default', 'taucs', 'band' or
'pardiso' (default |
graph |
A boolean variable if the graph itself should be returned. (Default FALSE.) |
internal.opt |
A boolean variable, if to do internal online
optimisations or not. (Default |
save.memory |
A boolean variable, make choices which saves memory over accuracy. (Default 'inla.getOption("save.memory")') |
control.gcpo |
(For experts only!) Set control variables for the gcpo.
The intended use is to use |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.expert( cpo.manual = FALSE, cpo.idx = -1, disable.gaussian.check = FALSE, jp = NULL, dot.product.gain = FALSE, globalconstr = list(A = NULL, e = NULL), opt.solve = FALSE ) inla.set.control.expert.default(...)
control.expert( cpo.manual = FALSE, cpo.idx = -1, disable.gaussian.check = FALSE, jp = NULL, dot.product.gain = FALSE, globalconstr = list(A = NULL, e = NULL), opt.solve = FALSE ) inla.set.control.expert.default(...)
cpo.manual |
A boolean variable to decide if the inla-program is to be runned in a manual-cpo-mode. (EXPERT OPTION: DO NOT USE) |
cpo.idx |
The index/indices of the data point(s) to remove. (EXPERIMENTAL OPTION: DO NOT USE) |
disable.gaussian.check |
Disable the check for fast computations with a
Gaussian likelihood and identity link (default |
jp |
An object of class |
dot.product.gain |
Output the gain in
optimizing dot-products? (Default |
globalconstr |
Add a global constraint (see |
opt.solve |
Store also |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.family( dummy = 0, hyper = NULL, initial = NULL, prior = NULL, param = NULL, fixed = NULL, link = "default", sn.shape.max = 5, gev.scale.xi = 0.1, control.bgev = NULL, cenpoisson.I = c(-1L, -1L), beta.censor.value = 0, variant = 0L, link.simple = "default", control.mix = NULL, control.pom = NULL, control.link = INLA::control.link(), control.sem = NULL ) inla.set.control.family.default(...)
control.family( dummy = 0, hyper = NULL, initial = NULL, prior = NULL, param = NULL, fixed = NULL, link = "default", sn.shape.max = 5, gev.scale.xi = 0.1, control.bgev = NULL, cenpoisson.I = c(-1L, -1L), beta.censor.value = 0, variant = 0L, link.simple = "default", control.mix = NULL, control.pom = NULL, control.link = INLA::control.link(), control.sem = NULL ) inla.set.control.family.default(...)
dummy |
A dummy argument that can be used as a workaround |
hyper |
Definition of the hyperparameters |
initial |
(OBSOLETE!) Initial value for the hyperparameter(s) of the likelihood in the internal scale. |
prior |
(OBSOLETE!) The name of the prior distribution(s) for othe hyperparameter(s). |
param |
(OBSOLETE!) The parameters for the prior distribution |
fixed |
(OBSOLETE!) Boolean variable(s) to say if the hyperparameter(s) is fixed or random. |
link |
(OBSOLETE! Use |
sn.shape.max |
Maximum value for the shape-parameter for Skew Normal observations (default 5.0) |
gev.scale.xi |
(Expert option, do not use unless you know what you are doing.) The internal scaling of the shape-parameter for the GEV distribution. (default 0.1) |
control.bgev |
See |
cenpoisson.I |
The censoring interval for the censored Poisson |
beta.censor.value |
The censor value for the Beta-likelihood |
variant |
This variable is used to give options for various variants of the likelihood, like chosing different parameterisations for example. See the relevant likelihood documentations for options (does only apply to some likelihoods). |
link.simple |
See |
control.mix |
See |
control.pom |
See |
control.link |
See |
control.sem |
Parameters for likelihood |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.fixed( cdf = NULL, quantiles = NULL, expand.factor.strategy = "model.matrix", mean = 0, mean.intercept = 0, prec = 0.001, prec.intercept = 0, compute = TRUE, correlation.matrix = FALSE, remove.names = NULL ) inla.set.control.fixed.default(...)
control.fixed( cdf = NULL, quantiles = NULL, expand.factor.strategy = "model.matrix", mean = 0, mean.intercept = 0, prec = 0.001, prec.intercept = 0, compute = TRUE, correlation.matrix = FALSE, remove.names = NULL ) inla.set.control.fixed.default(...)
cdf |
A list of values to compute the CDF for, for all fixed effects |
quantiles |
A list of quantiles to compute for all fixed effects |
expand.factor.strategy |
The strategy used to expand factors into fixed
effects based on their levels. The default strategy is us use the
|
mean |
Prior mean for all fixed effects except the intercept.
Alternatively, a named list with specific means where name=default applies to
unmatched names. For example |
mean.intercept |
Prior mean for the intercept (default 0.0) |
prec |
Default precision for all fixed effects except the intercept.
Alternatively, a named list with specific means where name=default applies to
unmatched names. For example |
prec.intercept |
Default precision the intercept (default 0.0) |
compute |
Compute marginals for the fixed effects ? (default TRUE) |
correlation.matrix |
Compute the posterior correlation matrix for all
fixed effects? (default FALSE) OOPS: This option will set up appropriate linear
combinations and the results are shown as the posterior correlation matrix of the
linear combinations. This option will imply
|
remove.names |
A vector of names of expanded fixed effects to remove from the model-matrix. This is an expert option, and should only be used if you know what you are doing. |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.gcpo( enable = FALSE, num.level.sets = -1, size.max = 32, strategy = c("posterior", "prior"), groups = NULL, selection = NULL, group.selection = NULL, friends = NULL, weights = NULL, verbose = FALSE, epsilon = 0.005, prior.diagonal = 1e-04, correct.hyperpar = TRUE, keep = NULL, remove = NULL, remove.fixed = TRUE ) inla.set.control.gcpo.default(...)
control.gcpo( enable = FALSE, num.level.sets = -1, size.max = 32, strategy = c("posterior", "prior"), groups = NULL, selection = NULL, group.selection = NULL, friends = NULL, weights = NULL, verbose = FALSE, epsilon = 0.005, prior.diagonal = 1e-04, correct.hyperpar = TRUE, keep = NULL, remove = NULL, remove.fixed = TRUE ) inla.set.control.gcpo.default(...)
enable |
TODO |
num.level.sets |
TODO |
size.max |
TODO |
strategy |
TODO |
groups |
TODO |
selection |
TODO |
group.selection |
TODO |
friends |
TODO |
weights |
TODO |
verbose |
TODO |
epsilon |
TODO |
prior.diagonal |
TODO |
correct.hyperpar |
TODO |
keep |
TODO |
remove |
TODO |
remove.fixed |
TODO |
... |
Named arguments passed on to the main function |
(For experts only!) Set control variables for the gcpo in control.compute.
The intended use is to use inla.group.cv
.
Refer to ?inla.group.cv
and the vignette for details.
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.group( model = "exchangeable", order = NULL, cyclic = FALSE, graph = NULL, scale.model = TRUE, adjust.for.con.comp = TRUE, hyper = NULL, initial = NULL, fixed = NULL, prior = NULL, param = NULL ) inla.set.control.group.default(...)
control.group( model = "exchangeable", order = NULL, cyclic = FALSE, graph = NULL, scale.model = TRUE, adjust.for.con.comp = TRUE, hyper = NULL, initial = NULL, fixed = NULL, prior = NULL, param = NULL ) inla.set.control.group.default(...)
model |
Group model (one of 'exchangable', 'exchangablepos', 'ar1', 'ar', 'rw1', 'rw2', 'besag', or 'iid') |
order |
Defines the |
cyclic |
Make the group model cyclic? (Only applies to models 'ar1', 'rw1' and 'rw2') |
graph |
The graph specification (Only applies to model 'besag') |
scale.model |
Scale the intrinsic model (RW1, RW2, BESAG) so the
generalized variance is 1. (Default |
adjust.for.con.comp |
Adjust for connected components when
|
hyper |
Definition of the hyperparameter(s) |
initial |
(OBSOLETE!) The initial value for the group correlation or precision in the internal scale. |
fixed |
(OBSOLETE!) A boolean variable if the group correction or precision is assumed to be fixed or random. |
prior |
(OBSOLETE!) The name of the prior distribution for the group correlation or precision in the internal scale |
param |
(OBSOLETE!) Prior parameters |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.hazard( model = "rw1", hyper = NULL, fixed = FALSE, initial = NULL, prior = NULL, param = NULL, constr = TRUE, diagonal = NULL, n.intervals = 15, cutpoints = NULL, strata.name = NULL, scale.model = NULL ) inla.set.control.hazard.default(...)
control.hazard( model = "rw1", hyper = NULL, fixed = FALSE, initial = NULL, prior = NULL, param = NULL, constr = TRUE, diagonal = NULL, n.intervals = 15, cutpoints = NULL, strata.name = NULL, scale.model = NULL ) inla.set.control.hazard.default(...)
model |
The model for the baseline hazard model. One of 'rw1', 'rw2' or 'iid'. (Default 'rw1'.) |
hyper |
The definition of the hyperparameters. |
fixed |
(OBSOLETE!) A boolean variable; is the precision for 'model' fixed? (Default FALSE.) |
initial |
(OBSOLETE!) The initial value for the precision. |
prior |
(OBSOLETE!) The prior distribution for the precision for 'model' |
param |
(OBSOLETE!) The parameters in the prior distribution |
constr |
A boolean variable; shall the 'model' be constrained to sum to zero? |
diagonal |
An extra constant added to the diagonal of the precision matrix |
n.intervals |
Number of intervals in the baseline hazard. (Default 15) |
cutpoints |
The cutpoints to use. If not specified the they are compute from 'n.intervals' and the maximum length of the interval. (Default NULL) |
strata.name |
The name of the stratefication variable for the baseline hazard in the data.frame |
scale.model |
Scale the baseline hazard model (RW1, RW2) so the
generalized variance is 1. (Default
|
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.inla( strategy = "auto", int.strategy = "auto", int.design = NULL, interpolator = "auto", fast = TRUE, linear.correction = NULL, h = 0.005, dz = 0.75, diff.logdens = 6, print.joint.hyper = TRUE, force.diagonal = FALSE, skip.configurations = TRUE, adjust.weights = TRUE, tolerance = 0.005, tolerance.f = NULL, tolerance.g = NULL, tolerance.x = NULL, tolerance.step = NULL, restart = 0L, optimiser = "default", verbose = NULL, reordering = "auto", cpo.diff = NULL, npoints = 9, cutoff = 1e-04, adapt.hessian.mode = NULL, adapt.hessian.max.trials = NULL, adapt.hessian.scale = NULL, adaptive.max = 25L, huge = FALSE, step.len = 0, stencil = 5L, lincomb.derived.correlation.matrix = FALSE, diagonal = 0, numint.maxfeval = 1e+05, numint.relerr = 1e-05, numint.abserr = 1e-06, cmin = -Inf, b.strategy = "keep", step.factor = -0.1, global.node.factor = 2, global.node.degree = .Machine$integer.max, stupid.search = TRUE, stupid.search.max.iter = 1000L, stupid.search.factor = 1.05, control.vb = INLA::control.vb(), num.gradient = "central", num.hessian = "central", optimise.strategy = "smart", use.directions = TRUE, constr.marginal.diagonal = sqrt(.Machine$double.eps), improved.simplified.laplace = FALSE, parallel.linesearch = FALSE, compute.initial.values = FALSE, hessian.correct.skewness.only = TRUE ) inla.set.control.inla.default(...)
control.inla( strategy = "auto", int.strategy = "auto", int.design = NULL, interpolator = "auto", fast = TRUE, linear.correction = NULL, h = 0.005, dz = 0.75, diff.logdens = 6, print.joint.hyper = TRUE, force.diagonal = FALSE, skip.configurations = TRUE, adjust.weights = TRUE, tolerance = 0.005, tolerance.f = NULL, tolerance.g = NULL, tolerance.x = NULL, tolerance.step = NULL, restart = 0L, optimiser = "default", verbose = NULL, reordering = "auto", cpo.diff = NULL, npoints = 9, cutoff = 1e-04, adapt.hessian.mode = NULL, adapt.hessian.max.trials = NULL, adapt.hessian.scale = NULL, adaptive.max = 25L, huge = FALSE, step.len = 0, stencil = 5L, lincomb.derived.correlation.matrix = FALSE, diagonal = 0, numint.maxfeval = 1e+05, numint.relerr = 1e-05, numint.abserr = 1e-06, cmin = -Inf, b.strategy = "keep", step.factor = -0.1, global.node.factor = 2, global.node.degree = .Machine$integer.max, stupid.search = TRUE, stupid.search.max.iter = 1000L, stupid.search.factor = 1.05, control.vb = INLA::control.vb(), num.gradient = "central", num.hessian = "central", optimise.strategy = "smart", use.directions = TRUE, constr.marginal.diagonal = sqrt(.Machine$double.eps), improved.simplified.laplace = FALSE, parallel.linesearch = FALSE, compute.initial.values = FALSE, hessian.correct.skewness.only = TRUE ) inla.set.control.inla.default(...)
strategy |
Character The strategy to use for the approximations; one of 'auto' (default), 'gaussian', 'simplified.laplace', 'laplace' or 'adaptive'. |
int.strategy |
Character The integration strategy to use; one of 'auto' (default), 'ccd', 'grid', 'eb' (empirical bayes), 'user' or 'user.std'. For the experimental mode, then 'grid' equal 'ccd' for more than two hyperparameters. |
int.design |
Matrix Matrix of user-defined integration points and weights. Each row consists theta values and the integration weight. (EXPERIMENTAL!). |
interpolator |
Character The interpolator used to compute the marginals for the hyperparameters. One of 'auto', 'nearest', 'quadratic', 'weighted.distance', 'ccd', 'ccdintegrate', 'gridsum', 'gaussian'. Default is 'auto'. |
fast |
Logical If TRUE, then replace conditional modes in the Laplace approximation with conditional expectation (default TRUE). |
linear.correction |
Logical Default TRUE for the 'strategy = laplace' option. |
h |
Numerical The step-length for the gradient calculations for the hyperparameters. Default 0.005. |
dz |
Numerical The step-length in the standarised scale for the integration of the hyperparameters. Default 0.75. |
diff.logdens |
Numerical The difference of the log.density for the hyperpameters to stop numerical integration using int.strategy='grid'. Default 6. |
print.joint.hyper |
Logical If TRUE, the store also the joint distribution of the hyperparameters (without any costs). Default TRUE. |
force.diagonal |
Logical If TRUE, then force the Hessian to be
diagonal. (Default |
skip.configurations |
Logical Skip configurations if the values at the
main axis are to small. (Default |
adjust.weights |
Logical If TRUE then just more accurate integration weights. (Default TRUE.) |
tolerance |
Numerical The tolerance for the optimisation of the hyperparameters. If set, this is the default value for for '2.5tolerance.f', 'tolerance.g', '5tolerance.x' and '2000*tolerance.step'; see below. |
tolerance.f |
Numerical The tolerance for the absolute change in the log posterior in the optimisation of the hyperparameters. |
tolerance.g |
Numerical The tolerance for the absolute change in the gradient of the log posterior in the optimisation of the hyperparameters. |
tolerance.x |
Numerical The tolerance for the change in the hyperparameters (root-mean-square) in the optimisation of the hyperparameters. |
tolerance.step |
Numerical The tolerance for the change in root-mean_squre in the inner Newton-like optimisation of the latent field. |
restart |
Numerical To improve the optimisation, the optimiser is restarted at the found optimum 'restart' number of times. |
optimiser |
Character The optimiser to use; one of 'gsl' or 'default'. |
verbose |
Logical Run in verbose mode? (Default FALSE) |
reordering |
Character Type of reordering to use. (EXPERT OPTION; one
of "AUTO", "DEFAULT", "IDENTITY", "REVERSEIDENTITY", "BAND", "METIS", "GENMMD",
"AMD", "MD", "MMD", "AMDBAR", "AMDC", "AMDBARC", or the output from
|
cpo.diff |
Numerical Threshold to define when the cpo-calculations are inaccurate. (EXPERT OPTION.) |
npoints |
Numerical Number of points to use in the 'stratey=laplace' approximation (default 9) |
cutoff |
Numerical The cutoff used in the 'stratey=laplace' approximation. (Smaller value is more accurate and more slow.) (default 1e-4) |
adapt.hessian.mode |
Logical Should optimisation be continued if the Hessian estimate is void? (Default TRUE) |
adapt.hessian.max.trials |
Numerical Number of steps in the adaptive Hessian optimisation |
adapt.hessian.scale |
Numerical The scaling of the 'h' after each trial. |
adaptive.max |
Selecting |
huge |
Logical If TRUE then try to do some of the internal parallelisations differently. Hopefully this will be of benefit for 'HUGE' models. (Default FALSE.) THIS OPTION IS OBSOLETE AND NOT USED! |
step.len |
Numerical The step-length used to compute numerical
derivaties of the log-likelihood (0 means |
stencil |
Numerical Number of points in the stencil used to compute the numerical derivaties of the log-likelihood (5, 7 or 9). (default 5) |
lincomb.derived.correlation.matrix |
Logical If TRUE compute also the correlations for the derived linear combinations, if FALSE do not (Default FALSE) |
diagonal |
Numerical Expert use only! Add a this value on the diagonal of the joint precision matrix. (default 0.0) |
numint.maxfeval |
Numerical Maximum number of function evaluations in the the numerical integration for the hyperparameters. (Default 100000.) |
numint.relerr |
Numerical Relative error requirement in the the numerical integration for the hyperparameters. (Default 1e-5) |
numint.abserr |
Numerical Absolute error requirement in the the numerical integration for the hyperparameters. (Default 1e-6) |
cmin |
Numerical The minimum value for the negative Hessian from the likelihood. Increasing this value will stabalise the optimisation but can introduce bias. (Default -Inf) |
b.strategy |
Character If |
step.factor |
Numerical The step factor in the Newton-Raphson algorithm saying how large step to take (Default 1.0) YES! setting this to a negative values means = 1, EXCEPT the first time (for each thread) where |step.factor| is used. |
global.node.factor |
Numerical The factor which defines the degree
required (how many neighbors), as a fraction of |
global.node.degree |
Numerical The degree required (number of
neighbors) to be classified as a global node and numbered
last (whatever the reordering routine says).
(default |
stupid.search |
Logical Enable or disable the stupid-search-algorithm,
if the Hessian calculations reveals that the mode is not found.
(Default |
stupid.search.max.iter |
Numerical Maximum number of iterations allowed for the stupid-search-algorithm. (default 1000) |
stupid.search.factor |
Numerical Factor (>=1) to increase the step-length with after each new iteration. (default 1.05) |
control.vb |
list of arguments for various VB corrections.
See |
num.gradient |
Character Set the numerical scheme to compute the
gradient, one of |
num.hessian |
Character Set the numerical scheme to compute the
Hessian, one of |
optimise.strategy |
Character THIS OPTION IS EXPERIMENTAL. Chose the
optimiser strategy, one of |
use.directions |
THIS OPTION IS EXPERIMENTAL. Unless |
constr.marginal.diagonal |
Add stability to |
improved.simplified.laplace |
If |
parallel.linesearch |
Use serial (default) or parallel line-search (highly experimental for the moment) |
compute.initial.values |
Compute initial values for the latent field or not. (experimental-mode only) |
hessian.correct.skewness.only |
If TRUE (default) correct only skewness in the Hessian, for the hyperparameters. If FALSE, correct also variance. (This option is for experimental-mode only) |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.lincomb(verbose = FALSE) inla.set.control.lincomb.default(...)
control.lincomb(verbose = FALSE) inla.set.control.lincomb.default(...)
verbose |
Use verbose mode for linear combinations if verbose model is
set globally. (Default FALSE). This option is only available for
the default |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.link( model = "default", order = NULL, variant = NULL, hyper = NULL, quantile = NULL, a = 1, initial = NULL, fixed = NULL, prior = NULL, param = NULL ) inla.set.control.link.default(...)
control.link( model = "default", order = NULL, variant = NULL, hyper = NULL, quantile = NULL, a = 1, initial = NULL, fixed = NULL, prior = NULL, param = NULL ) inla.set.control.link.default(...)
model |
The name of the link function/model |
order |
The |
variant |
The |
hyper |
Definition of the hyperparameter(s) for the link model chosen |
quantile |
The quantile for quantile link function |
a |
The parameter |
initial |
(OBSOLETE!) The initial value(s) for the hyperparameter(s) |
fixed |
(OBSOLETE!) A boolean variable if hyperparmater(s) is/are fixed or random |
prior |
(OBSOLETE!) The name of the prior distribution(s) for the hyperparmater(s) |
param |
(OBSOLETE!) The parameters for the prior distribution(s) for the hyperparmater(s) |
... |
Named arguments passed on to the main function |
The control.link
-list is set within the corresponding control.family
-list as the link is likelihood-family specific.
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.lp.scale(hyper = NULL) inla.set.control.lp.scale.default(...)
control.lp.scale(hyper = NULL) inla.set.control.lp.scale.default(...)
hyper |
Definition of the hyperparameter(s) |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.mix( model = NULL, hyper = NULL, initial = NULL, fixed = NULL, prior = NULL, param = NULL, npoints = 101, integrator = "default" ) inla.set.control.mix.default(...)
control.mix( model = NULL, hyper = NULL, initial = NULL, fixed = NULL, prior = NULL, param = NULL, npoints = 101, integrator = "default" ) inla.set.control.mix.default(...)
model |
The model for the random effect. Currently, only
|
hyper |
Definition of the hyperparameter(s) for the random effect model chosen |
initial |
(OBSOLETE!) The initial value(s) for the hyperparameter(s) |
fixed |
(OBSOLETE!) A boolean variable if hyperparmater(s) is/are fixed or random |
prior |
(OBSOLETE!) The name of the prior distribution(s) for the hyperparmater(s) |
param |
(OBSOLETE!) The parameters for the prior distribution(s) for the hyperparmater(s) |
npoints |
Number of points used to do the numerical integration (default 101) |
integrator |
The integration scheme to use ( |
... |
Named arguments passed on to the main function |
The control.mix
list is set within the corresponding control.family
-list a the mixture of the likelihood is likelihood specific. (This option is EXPERIMENTAL.)
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.mode( result = NULL, theta = NULL, x = NULL, restart = TRUE, fixed = FALSE ) inla.set.control.mode.default(...)
control.mode( result = NULL, theta = NULL, x = NULL, restart = TRUE, fixed = FALSE ) inla.set.control.mode.default(...)
result |
Previous result-object from inla(), a inla-state object or the name of a
state-file. Use the |
theta |
The theta-mode/initial values for theta. This option has preference over result$mode$theta. |
x |
The x-mode/initial values for x. This option has preference over
result$mode$x. (This option is less important than |
restart |
A boolean variable; should we restart the optimisation from
the given configuration? If |
fixed |
A boolean variable. If |
... |
Named arguments passed on to the main function |
For internal use only and for algorithms built on to of INLA.
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.numa(enable = NULL)
control.numa(enable = NULL)
enable |
Enable NUMA aware cache? (NULL used the value |
Extra options controlling the NUMA awareness (when NUMA is present)
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.pardiso( verbose = FALSE, debug = FALSE, parallel.reordering = TRUE, nrhs = -1 ) inla.set.control.pardiso.default(...)
control.pardiso( verbose = FALSE, debug = FALSE, parallel.reordering = TRUE, nrhs = -1 ) inla.set.control.pardiso.default(...)
verbose |
Show detailed output (default FALSE) |
debug |
Show internal debug output (default FALSE) |
parallel.reordering |
Do reordering in parallel (default TRUE) |
nrhs |
Number of right-hand sides to solve for in parallel ( |
... |
Named arguments passed on to the main function |
Extra options controlling the PARDISO library
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.pom(cdf = "logit", fast = FALSE) inla.set.control.pom.default(...)
control.pom(cdf = "logit", fast = FALSE) inla.set.control.pom.default(...)
cdf |
character The cdf to use, "logit" (default) or "probit" |
fast |
Logical Use a faster but approximate form for the probit cdf
(default |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.predictor( hyper = NULL, fixed = NULL, prior = NULL, param = NULL, initial = NULL, compute = FALSE, cdf = NULL, quantiles = NULL, cross = NULL, A = NULL, precision = exp(15), link = NULL ) inla.set.control.predictor.default(...)
control.predictor( hyper = NULL, fixed = NULL, prior = NULL, param = NULL, initial = NULL, compute = FALSE, cdf = NULL, quantiles = NULL, cross = NULL, A = NULL, precision = exp(15), link = NULL ) inla.set.control.predictor.default(...)
hyper |
Definition of the hyperparameters. |
fixed |
(OBSOLETE!) If the precision for the artificial noise is fixed or not (default TRUE) |
prior |
(OBSOLETE!) The prior for the artificial noise |
param |
(OBSOLETE!) Prior parameters for the artificial noise |
initial |
(OBSOLETE!) The value of the log precision of the artificial noise |
compute |
A boolean variable; should the marginals for the linear predictor be computed? (Default FALSE.) |
cdf |
A list of values to compute the CDF for the linear predictor |
quantiles |
A list of quantiles to compute for the linear predictor |
cross |
Cross-sum-to-zero constraints with the linear predictor. All linear predictors with the same level of 'cross' are constrained to have sum zero. Use 'NA' for no contribution. 'Cross' has the same length as the linear predictor (including the 'A' matrix extention). (THIS IS AN EXPERIMENTAL OPTION, CHANGES MAY APPEAR.) |
A |
The observation matrix (matrix or Matrix::sparseMatrix). |
precision |
The precision for eta* - A*eta, (default |
link |
Define the family-connection for unobserved observations
( |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.scopy(covariate = NULL, n = 11) inla.set.control.scopy.default(...)
control.scopy(covariate = NULL, n = 11) inla.set.control.scopy.default(...)
covariate |
The covariate for the scopy function |
n |
Number of locations in the RW2 (n = 2 or 5 <= n <= 15) |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.sem(B = NULL, idx = 0) inla.set.control.sem.default(...)
control.sem(B = NULL, idx = 0) inla.set.control.sem.default(...)
B |
The symbolic B-matrix, where each element is a string giving the expression for that particular element, in terms of beta-parameters for copy |
idx |
Which diagonal element to use for the variance. |
... |
Named arguments passed on to the main function |
Parameters to family sem
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.stiles()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.stiles(verbose = FALSE, tile.size = 0) inla.set.control.stiles.default(...)
control.stiles(verbose = FALSE, tile.size = 0) inla.set.control.stiles.default(...)
verbose |
Show detailed output (default FALSE) |
tile.size |
The size of the tile (default 0 will chose automatically) |
... |
Named arguments passed on to the main function |
Extra options controlling the sTiles library
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.taucs()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.taucs(block.size = 40) inla.set.control.taucs.default(...)
control.taucs(block.size = 40) inla.set.control.taucs.default(...)
block.size |
Preferred number of rhs's in each parallel solve |
... |
Named arguments passed on to the main function |
Extra options controlling the TAUCS library
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.update()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.update(result = NULL) inla.set.control.update.default(...)
control.update(result = NULL) inla.set.control.update.default(...)
result |
Update the joint posterior for the hyperparameters from result |
... |
Named arguments passed on to the main function |
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.vb()
Control variables in control.*
for use with inla()
.
The functions can be used to TAB-complete arguments, and
returns a list of the default control arguments, unless overridden by
specific input arguments.
control.vb( enable = "auto", strategy = c("mean", "variance"), verbose = TRUE, iter.max = 25, emergency = 25, f.enable.limit = c(30, 25, 1024, 768), hessian.update = 2, hessian.strategy = c("default", "full", "partial", "diagonal") ) inla.set.control.vb.default(...)
control.vb( enable = "auto", strategy = c("mean", "variance"), verbose = TRUE, iter.max = 25, emergency = 25, f.enable.limit = c(30, 25, 1024, 768), hessian.update = 2, hessian.strategy = c("default", "full", "partial", "diagonal") ) inla.set.control.vb.default(...)
enable |
Logical/Character Use this feature? If |
strategy |
Character What to correct, either "mean" or "variance". |
verbose |
Logical Be verbose or not. |
iter.max |
Integer Maximum number of iterations. |
emergency |
Numeric If the standardized correction for the mean is larger than this value, then call the vb.correction off and issue a warning |
f.enable.limit |
Vector of length 4. The size limit to correct for a |
hessian.update |
How many times the Hessian is updated for each correction. |
hessian.strategy |
Select strategy for computing the Hessian
matrix for |
... |
Named arguments passed on to the main function |
control.vb List of arguments for various VB corrections.
Used for control.inla control.vb
specifications.
Other control:
control.bgev()
,
control.compute()
,
control.expert()
,
control.family()
,
control.fixed()
,
control.gcpo()
,
control.group()
,
control.hazard()
,
control.inla()
,
control.lincomb()
,
control.link()
,
control.lp.scale()
,
control.mix()
,
control.mode()
,
control.numa()
,
control.pardiso()
,
control.pom()
,
control.predictor()
,
control.scopy()
,
control.sem()
,
control.stiles()
,
control.taucs()
,
control.update()
in favour of
fmesher::fm_wkt()
and related
methods.
Get and set CRS object or WKT string properties.
inla.wkt_is_geocent(wkt) inla.crs_is_geocent(crs) inla.wkt_get_ellipsoid_radius(wkt) inla.crs_get_ellipsoid_radius(crs) inla.wkt_set_ellipsoid_radius(wkt, radius) inla.crs_set_ellipsoid_radius(crs, radius) inla.wkt_unit_params() inla.wkt_get_lengthunit(wkt) inla.wkt_set_lengthunit(wkt, unit, params = NULL) inla.crs_get_wkt(crs) inla.crs_get_lengthunit(crs) inla.crs_set_lengthunit(crs, unit, params = NULL)
inla.wkt_is_geocent(wkt) inla.crs_is_geocent(crs) inla.wkt_get_ellipsoid_radius(wkt) inla.crs_get_ellipsoid_radius(crs) inla.wkt_set_ellipsoid_radius(wkt, radius) inla.crs_set_ellipsoid_radius(crs, radius) inla.wkt_unit_params() inla.wkt_get_lengthunit(wkt) inla.wkt_set_lengthunit(wkt, unit, params = NULL) inla.crs_get_wkt(crs) inla.crs_get_lengthunit(crs) inla.crs_set_lengthunit(crs, unit, params = NULL)
wkt |
A WKT2 character string |
crs |
A |
radius |
numeric |
unit |
character, name of a unit. Supported names are
"metre", "kilometre", and the aliases "meter", "m", International metre",
"kilometer", and "km", as defined by |
params |
Length unit definitions, in the list format produced by
|
For inla.wkt_unit_params
, a list of named unit definitions
For inla.wkt_get_lengthunit
, a list of length units used in the wkt
string, excluding the ellipsoid radius unit.
For inla.wkt_set_lengthunit
, a WKT2 string with altered length units.
Note that the length unit for the ellipsoid radius is unchanged.
For inla.crs_get_wkt
, WKT2 string.
For inla.crs_get_lengthunit
, a list of length units used in the wkt
string, excluding the ellipsoid radius unit. (For legacy PROJ4 code, the raw
units from the proj4string are returned, if present.)
For inla.crs_set_lengthunit
, a sp::CRS
object with altered
length units. Note that the length unit for the ellipsoid radius is
unchanged.
For inla.wkt_unit_params
, a
list of named unit definitions
For inla.wkt_get_lengthunit
, a
list of length units used in the wkt string, excluding the ellipsoid radius
unit.
For inla.wkt_set_lengthunit
, a
WKT2 string with altered length units.
Note that the length unit for the ellipsoid radius is unchanged.
For inla.crs_get_wkt
, WKT2 string.
For inla.crs_get_lengthunit
, a
list of length units used in the wkt string, excluding the ellipsoid radius
unit. (For legacy PROJ4 code, the raw units from the proj4string are
returned, if present.)
For inla.crs_set_lengthunit
, a sp::CRS
object with
altered length units.
Note that the length unit for the ellipsoid radius is unchanged.
inla.wkt_is_geocent()
: in favour of
fmesher::fm_wkt_is_geocent()
inla.crs_is_geocent()
: in favour of
fmesher::fm_crs_is_geocent()
inla.wkt_get_ellipsoid_radius()
: in favour of
fmesher::fm_ellipsoid_radius()
inla.crs_get_ellipsoid_radius()
: in favour of
fmesher::fm_ellipsoid_radius()
inla.wkt_set_ellipsoid_radius()
: in favour of
fmesher::fm_wkt_set_ellipsoid_radius()
inla.crs_set_ellipsoid_radius()
: in favour of
fmesher::fm_ellipsoid_radius<-()
Finn Lindgren finn.lindgren@gmail.com
## Not run: c1 <- fmesher::fm_crs("globe") inla.crs_get_lengthunit(c1) c2 <- inla.crs_set_lengthunit(c1, "metre") inla.crs_get_lengthunit(c2) ## End(Not run) ## Not run: c1 <- inla.CRS("globe") inla.crs_get_lengthunit(c1) c2 <- inla.crs_set_lengthunit(c1, "km") inla.crs_get_lengthunit(c2) ## End(Not run)
## Not run: c1 <- fmesher::fm_crs("globe") inla.crs_get_lengthunit(c1) c2 <- inla.crs_set_lengthunit(c1, "metre") inla.crs_get_lengthunit(c2) ## End(Not run) ## Not run: c1 <- inla.CRS("globe") inla.crs_get_lengthunit(c1) c2 <- inla.crs_set_lengthunit(c1, "km") inla.crs_get_lengthunit(c2) ## End(Not run)
This function performs group-wise, cross-validatory model assessment for an
INLA model using so-called node-splitting (Marshall and Spiegelhalter, 2007;
Presanis et al, 2013). The user inputs an object of class inla
(i.e.
a result of a call to inla()
) as well as a variable name
(split.by
) specifying a grouping: Data points that share the same
value of split.by
are in the same group. The function then checks
whether each group is an "outlier", or in conflict with the remaining
groups, using the methodology described in Ferkingstad et al (2017). The
result is a vector containing a p-value for each group, corresponding to a
test for each group i
, where the null hypothesis is that group
i
is consistent with the other groups except i
(so a small
p-value is evidence that the group is an "outlier"). See Ferkingstad et al
(2017) for further details.
inla.cut(result, split.by, mc.cores = NULL, debug = FALSE)
inla.cut(result, split.by, mc.cores = NULL, debug = FALSE)
result |
An object of class |
split.by |
The name of the variable to group by. Data points that have
the same value of |
mc.cores |
The number of cores to use in |
debug |
Print debugging information if |
A numeric vector of p-values, corresponding to a test for each group
i
where the null hypothesis is that group i
is consistent with
the other groups except i
. A small p-value for a group indicates that
the group is an "outlier" (in conflict with remaining groups).
This function is EXPERIMENTAL!!!
Egil Ferkingstad egil.ferkingstad@gmail.com and Havard Rue hrue@r-inla.org
Ferkingstad, E., Held, L. and Rue, H. (2017). Fast and accurate Bayesian model criticism and conflict diagnostics using R-INLA. arXiv preprint arXiv:1708.03272, available at http://arxiv.org/abs/1708.03272. Published in Stat, 6:331-344 (2017).
Marshall, E. C. and Spiegelhalter, D. J. (2007). Identifying outliers in Bayesian hierarchical models: a simulation-based approach. Bayesian Analysis, 2(2):409-444.
Presanis, A. M., Ohlssen, D., Spiegelhalter, D. J., De Angelis, D., et al. (2013). Conflict diagnostics in directed acyclic graphs, with applications in Bayesian evidence synthesis. Statistical Science, 28(3):376-397.
## See http://www.r-inla.org/examples/case-studies/ferkingstad-2017 and Ferkingstad et al (2017).
## See http://www.r-inla.org/examples/case-studies/ferkingstad-2017 and Ferkingstad et al (2017).
Debug a graph specification on file (ascii-mode only), by checking the specification along the way.
inla.debug.graph(graph.file)
inla.debug.graph(graph.file)
graph.file |
The filename of the graph (ascii-mode) |
If an error is found, then an error message is shows, otherwise the
graph-object returned by inla.read.graph()
is returned.
Havard Rue hrue@r-inla.org
inla.read.graph
## Not run: cat("3\n 1 1 2n\ 2 1 1\n 3 4\n", file="g.dat") g = inla.debug.graph("g.dat") ## End(Not run)
## Not run: cat("3\n 1 1 2n\ 2 1 1\n 3 4\n", file="g.dat") g = inla.debug.graph("g.dat") ## End(Not run)
Montly total of car drivers killed or several injuried in England from January 1969 to December 1984
A data frame with 204 observations on the following 4 variables.
Number of deaths
Indicator of weather the belt was compulsory to use (1) or not (0)
time (in months)
time (in months)
NB: The last 12 lines of the data set have the first column set to
NULL
since these data where not observed but we want to predict them.
Rue, H and Held, L. (2005) Gaussian Markov Random Fields - Theory and Applications Chapman and Hall
data(Drivers)
data(Drivers)
Do a dryrun to get information about the internal storage and the list (and ordering) of the hyperparameters
inla.dryrun(...)
inla.dryrun(...)
... |
Same arguments as |
A list of start-index and length for each latent component and a list of the hyperparameters in the model
Havard Rue hrue@r-inla.org
Seizure counts in a randomised trial of anti-convulsant therpay in epilepsy for 59 patients.
A data frame with 236 observations on the following 7 variables.
Number of seizures
indicator for the presence of treatment
8-week baseline seizure counts
Age of the patient
indicator variable for the 4th visit.
a numeric vector
indicator for the specific patient
WinBUGS/OpenBUGS Manual Examples Vol I
data(Epil)
data(Epil)
Use
fmesher::fm_segm()
instead.
Extract boundary or internal segments tagged by group id:s.
extract.groups(segm, groups, groups.new = groups, ...)
extract.groups(segm, groups, groups.new = groups, ...)
segm |
An |
groups |
The segment groups id:s to extract. |
groups.new |
Optional vector of group id remapping; |
... |
Additional arguments, passed on to other methods. |
Finn Lindgren finn.lindgren@gmail.com
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
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 )
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 )
... |
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) |
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.
TODO
Havard Rue hrue@r-inla.org
This function will return the coefficients in the 3-component AR(1) mixture representing FGN(H)
inla.fgn(H, K = 4L, lag.max = NULL, approx = TRUE)
inla.fgn(H, K = 4L, lag.max = NULL, approx = TRUE)
H |
The Hurst coeffcient (0<H<1), or a vector of those |
K |
The number of components in representation, must be 3L or 4L |
lag.max |
Integer. If positive integer, return the coeffcients
implicitely as the ACF from 0 to |
approx |
Logical. If |
inla.fgn
returns a named matrix. If is.null(lag.max)
,
then first column is H
, columns 1+1:K
are lag one correlations
(or phi's), and columns 1+K+1:K
are the weights. If lag.max > 0
, then return the ACFs in columns 2+(0:lag.max)
, for the H in
column 1, either the approximated ones or the the true ones.
This function is EXPERIMENTAL!!!
Havard Rue hrue@r-inla.org
r = c(inla.fgn(0.7)) r_m = inla.fgn(seq(0.6, 0.8, by=0.01))
r = c(inla.fgn(0.7)) r_m = inla.fgn(seq(0.6, 0.8, by=0.01))
Cases of Oral cavity cancer in Germany from 1986-1990
A data frame with 544 observations on the following 4 variables.
Region of Germany
Fixed quantity which accounts for number of people in the district (offset)
Number of cases
covariate measuring smoking consumption
Rue, H and Held, L. (2005) Gaussian Markov Random Fields - Theory and Applications Chapman and Hall
data(Germany)
data(Germany)
Various utility functions for INLA
inla.geobugs2inla(adj, num, graph.file = "graph.dat")
inla.geobugs2inla(adj, num, graph.file = "graph.dat")
adj |
A vector listing the ID numbers of the adjacent areas for each area. This is a sparse representation of the full adjacency matrix for the study region, and can be generated using the Adjacency Tool from the Map menu in GeoBUGS. |
num |
A vector of length N (the total number of areas) giving the number of neighbours n.i for each area. |
graph.file |
Name of the file of the new graph in the INLA format. |
The return value is the name of the graph-file created.
These are all the same function, and the two different names are due to backward-compatibility
Havard Rue hrue@r-inla.org
inla()
, inla.surv()
,
hyperpar.inla()
graph
Construct a neighbour-matrix from a graph
and disaply it
inla.matrix2graph(graph, ...) inla.graph2matrix(graph, ...) inla.spy(graph, ..., reordering = NULL)
inla.matrix2graph(graph, ...) inla.graph2matrix(graph, ...) inla.spy(graph, ..., reordering = NULL)
graph |
An |
... |
Additional arguments to |
reordering |
A possible reordering. Typical the one obtained from a
|
inla.graph2matrix
returns a sparse symmetric matrix where the
non-zero pattern is defined by the graph
. The inla.spy
function, plots the associated sparse matrix defined by the graph
. The reordering
argument is typically the reordering found by inla.qreordering()
.
Havard Rue hrue@r-inla.org
inla.read.graph()
, inla.qreordering()
n = 50 Q = matrix(0, n, n) idx = sample(1:n, 2*n, replace=TRUE) Q[idx, idx] = 1 diag(Q) = 1 g = inla.read.graph(Q) QQ = inla.graph2matrix(g) inla.spy(QQ) print(all.equal(as.matrix(Q), as.matrix(QQ))) g.file = inla.write.graph(g, filename = tempfile()) inla.dev.new() inla.spy(g.file) inla.spy(g.file, reordering = inla.qreordering(g)) g = inla.read.graph(g.file) inla.dev.new() inla.spy(g) ## Old examples that don't work with the inla.spy call syntax: # inla.dev.new() # inla.spy(3, 1, "1 2 2 1 1 3 0") # inla.dev.new() # inla.spy(3, 1, "1 2 2 1 1 3 0", reordering = 3:1)
n = 50 Q = matrix(0, n, n) idx = sample(1:n, 2*n, replace=TRUE) Q[idx, idx] = 1 diag(Q) = 1 g = inla.read.graph(Q) QQ = inla.graph2matrix(g) inla.spy(QQ) print(all.equal(as.matrix(Q), as.matrix(QQ))) g.file = inla.write.graph(g, filename = tempfile()) inla.dev.new() inla.spy(g.file) inla.spy(g.file, reordering = inla.qreordering(g)) g = inla.read.graph(g.file) inla.dev.new() inla.spy(g) ## Old examples that don't work with the inla.spy call syntax: # inla.dev.new() # inla.spy(3, 1, "1 2 2 1 1 3 0") # inla.dev.new() # inla.spy(3, 1, "1 2 2 1 1 3 0", reordering = 3:1)
Convert indexes given by to triplet ‘(idx, group, replicate)’ to the (one-dimensional) index used in the grouped and replicated model
inla.idx( idx, n = max(idx), group = rep(1, length(idx)), ngroup = max(group), replicate = rep(1, length(idx)), nrep = max(replicate) )
inla.idx( idx, n = max(idx), group = rep(1, length(idx)), ngroup = max(group), replicate = rep(1, length(idx)), nrep = max(replicate) )
idx |
The index within the basic model. (Legal values from |
n |
The length ‘n’ of the basic model. |
group |
The index within group. (Legal values from |
ngroup |
Number of groups. |
replicate |
The index within replication. (Legal values from |
nrep |
Number of replications. |
inla.idx
returns indexes in the range 1' to
nngroupnrep' representing where the triplet ‘(idx,group,replicate)’ is
stored internally in the full grouped and replicated model.
Havard Rue hrue@r-inla.org
##TODO
##TODO
inla
performs a full Bayesian analysis of additive models using
Integrated Nested Laplace approximation
inla( formula = NULL, family = "gaussian", contrasts = NULL, data = NULL, quantiles = c(0.025, 0.5, 0.975), E = NULL, offset = NULL, scale = NULL, weights = NULL, Ntrials = NULL, strata = NULL, lp.scale = NULL, link.covariates = NULL, verbose = inla.getOption("verbose"), lincomb = NULL, selection = NULL, control.compute = list(), control.predictor = list(), control.family = list(), control.inla = list(), control.fixed = list(), control.mode = list(), control.expert = list(), control.hazard = list(), control.lincomb = list(), control.update = list(), control.lp.scale = list(), control.pardiso = list(), control.stiles = list(), control.taucs = list(), control.numa = 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"), inla.mode = inla.getOption("inla.mode"), safe = inla.getOption("safe"), debug = inla.getOption("debug"), .parent.frame = environment(formula) )
inla( formula = NULL, family = "gaussian", contrasts = NULL, data = NULL, quantiles = c(0.025, 0.5, 0.975), E = NULL, offset = NULL, scale = NULL, weights = NULL, Ntrials = NULL, strata = NULL, lp.scale = NULL, link.covariates = NULL, verbose = inla.getOption("verbose"), lincomb = NULL, selection = NULL, control.compute = list(), control.predictor = list(), control.family = list(), control.inla = list(), control.fixed = list(), control.mode = list(), control.expert = list(), control.hazard = list(), control.lincomb = list(), control.update = list(), control.lp.scale = list(), control.pardiso = list(), control.stiles = list(), control.taucs = list(), control.numa = 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"), inla.mode = inla.getOption("inla.mode"), safe = inla.getOption("safe"), debug = inla.getOption("debug"), .parent.frame = environment(formula) )
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,
|
E |
Known component in the mean for the Poisson likelihoods defined as
where
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 |
weights |
Fixed (optional) weights parameters of the likelihood, so the
|
Ntrials |
A vector containing the number of trials for the
|
strata |
Fixed (optional) strata indicators for tstrata likelihood model and similar. The documentation for each likelihood will inform if this argument is required. |
lp.scale |
A vector with same length as the predictor going into the
likelihood with either |
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 |
selection |
This is a similar argument to the one in
|
control.compute |
See |
control.predictor |
See |
control.family |
See |
control.inla |
See |
control.fixed |
See |
control.mode |
See |
control.expert |
See |
control.hazard |
See |
control.lincomb |
See |
control.update |
See |
control.lp.scale |
See |
control.pardiso |
See |
control.stiles |
See |
control.taucs |
See |
control.numa |
See |
only.hyperparam |
If |
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. (This is an expert option and not intended for normal usage.) |
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 model-files. Sometimes this argument is
required if the temporary directory returned with |
silent |
If equal to 1L or TRUE, then the |
inla.mode |
Run |
safe |
If |
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 |
A list containing the posterior marginal densities
of the random effects defined through |
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 |
marginals.linear.predictor |
If |
summary.fitted.values |
A matrix containing the mean and sd (plus, possibly quantiles and cdf) of
the fitted values |
marginals.fitted.values |
If
|
summary.lincomb |
If |
marginals.lincomb |
If |
selection |
Provide
the approximated joint distribution for the |
dic |
If
|
cpo |
If |
po |
If |
residuals |
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@r-inla.org and Sara Martino
Aggregate Gaussians observed with the same mean and precision,
into an equivalent triplet, for use with family="agaussian"
inla.agaussian(y, s = NULL)
inla.agaussian(y, s = NULL)
y |
Repeated observations. If |
s |
Optional fixed scaling of the precisions. Must be in the same format as |
The output is a inla.mdata
-object ready for use
with family="agaussian"
. See the example in the documentation.
Havard Rue hrue@r-inla.org
A = matrix(1:25,5,5) inla.agaussian(A) A[1,-1] = NA A[2,-(2:3)] = NA inla.agaussian(A)
A = matrix(1:25,5,5) inla.agaussian(A) A[1,-1] = NA A[2,-(2:3)] = NA inla.agaussian(A)
These functions convert between the AR(p) coefficients phi
, the
partial autorcorrelation coefficients pacf
and the autocorrelation
function acf
. The phi
-parameterization is the same as used
for arima
-models in R
; see ?arima
and the
parameter-vector a
in Details
.
inla.ar.pacf2phi(pac) inla.ar.phi2pacf(phi) inla.ar.phi2acf(phi, lag.max = length(phi)) inla.ar.pacf2acf(pac, lag.max = length(pac))
inla.ar.pacf2phi(pac) inla.ar.phi2pacf(phi) inla.ar.phi2acf(phi, lag.max = length(phi)) inla.ar.pacf2acf(pac, lag.max = length(pac))
pac |
The partial autorcorrelation coefficients |
phi |
The AR(p) parameters |
lag.max |
The maximum lag to compute the ACF for |
inla.ar.pacf2phi
returns phi
for given pacf
.
inla.ar.phi2pacf
returns pac
for given phi
.
inla.ar.phi2acf
returns acf
for given phi
.
inla.ar.pacf2acf
returns acf
for given pacf
.
Havard Rue hrue@r-inla.org
pac <- runif(5) phi <- inla.ar.pacf2phi(pac) pac2 <- inla.ar.phi2pacf(phi) print(paste("Error:", max(abs(pac2 - pac)))) print("Correlation matrix (from pac)") print(toeplitz(inla.ar.pacf2acf(pac))) print("Correlation matrix (from phi)") print(toeplitz(inla.ar.phi2acf(phi)))
pac <- runif(5) phi <- inla.ar.pacf2phi(pac) pac2 <- inla.ar.phi2pacf(phi) print(paste("Error:", max(abs(pac2 - pac)))) print("Correlation matrix (from pac)") print(toeplitz(inla.ar.pacf2acf(pac))) print("Correlation matrix (from phi)") print(toeplitz(inla.ar.phi2acf(phi)))
Convert a matrix or sparse matrix into the sparse format used by INLA (dgTMatrix)
inla.as.sparse(A, unique = TRUE, na.rm = FALSE, zeros.rm = FALSE) inla.as.dgTMatrix(...)
inla.as.sparse(A, unique = TRUE, na.rm = FALSE, zeros.rm = FALSE) inla.as.dgTMatrix(...)
A |
The matrix |
unique |
Logical. If |
na.rm |
Replace |
zeros.rm |
Remove zeros in the matrix. |
... |
The arguments. The matrix or sparse matrix, and the additonal arguments |
inla.as.sparse
and inla.as.dgTMatrix
is the same
function. The returned value is a sparse matrix in the
dgTMatrix
-format.
Havard Rue hrue@r-inla.org
A = matrix(1:9, 3, 3) inla.as.sparse(A)
A = matrix(1:9, 3, 3) inla.as.sparse(A)
in favour of
fmesher::fm_wkt_as_wkt_tree()
.
Conversion between WKT and a tree representation
inla.as.wkt_tree.wkt(x, ...) inla.as.wkt.wkt_tree(x, pretty = FALSE, ...) inla.wkt_tree_get_item(x, item, duplicate = 1) inla.wkt_tree_set_item(x, item_tree, duplicate = 1)
inla.as.wkt_tree.wkt(x, ...) inla.as.wkt.wkt_tree(x, pretty = FALSE, ...) inla.wkt_tree_get_item(x, item, duplicate = 1) inla.wkt_tree_set_item(x, item_tree, duplicate = 1)
x |
A WKT2 string, or a |
... |
Unused |
pretty |
logical |
item |
character vector with item labels identifying a parameter item entry. |
duplicate |
For items that have more than one match, |
item_tree |
An item tree identifying a parameter item entry |
Functions for defining Barrier models as an inla rgeneric
model
inla.barrier.pcmatern( mesh, barrier.triangles, prior.range, prior.sigma, range.fraction = 0.2, enable.INLAspacetime = TRUE ) inla.barrier.polygon(mesh, barrier.triangles, Omega = NULL) inla.barrier.q(fem, ranges, sigma = 1, envir = NULL) inla.barrier.fem(mesh, barrier.triangles, Omega = NULL)
inla.barrier.pcmatern( mesh, barrier.triangles, prior.range, prior.sigma, range.fraction = 0.2, enable.INLAspacetime = TRUE ) inla.barrier.polygon(mesh, barrier.triangles, Omega = NULL) inla.barrier.q(fem, ranges, sigma = 1, envir = NULL) inla.barrier.fem(mesh, barrier.triangles, Omega = NULL)
mesh |
The mesh to build the model on, from inla.mesh.2d |
barrier.triangles |
The numerical ids of the triangles that make up the barrier area |
prior.range |
2 parameters |
prior.sigma |
2 parameters |
range.fraction |
The length of the spatial range inside the barrier area, as a fraction of the range parameter. |
enable.INLAspacetime |
Use the implentation in the package |
Omega |
Advanced option for creating a set of permeable barriers (not documented) |
fem |
represents the Barrier model or the Different Terrains (DT) model, by containing all the needed matrices to solve the SPDE |
ranges , sigma
|
the hyperparameters that determine Q |
envir |
the environment used for caching (with optimize=TRUE), if any |
This model is described in the ArXiv preprint arXiv:1608.03787. For examples, see https://haakonbakkagit.github.io/btopic128.html
inla.barrier.pcmatern
This function creates the model component used in inla(...)
inla.barrier.polygon
This function constructs SpatialPolygons for the different subdomains (areas)
inla.barrier.q
: This function computes a specific precision matrix
inla.barrier.fem
This function computes the Finite Element
matrices that are needed to compute the precision matrix Q later
inla.barrier.pcmatern
gives the (rgeneric) model object
for fitting the model in INLA
inla.barrier.polygon
gives the polygon
around the barrier (mainly for plotting)
inla.barrier.q
is an
internal method producing the Q matrix from a result of inla.barrier.fem,
inla.barrier.fem
is an internal method producing the Finite Element
matrices.
Haakon Bakka bakka@r-inla.org
inla.spde2.pcmatern
Install a new binary for os
unless missing(os)
, for which the
os
is chosen interactively among the available builds.
inla.binary.install( os = c("CentOS Linux-6", "CentOS Linux-7", "CentOS Linux-8", "CentOS Stream-8", "Rocky Linux-8", "Rocky Linux-9", "Manjaro Linux-", "Fedora-33", "Fedora-34", "Fedora Linux-35", "Fedora Linux-36", "Fedora Linux-37", "Fedora Linux-38", "Fedora Linux-39", "Fedora Linux-40", "Fedora Linux-41", "Ubuntu-16.04", "Ubuntu-18.04", "Ubuntu-20.04", "Ubuntu-22.04", "Ubuntu-24.04"), path = NULL, verbose = TRUE, md5.check = TRUE, secure.http = TRUE )
inla.binary.install( os = c("CentOS Linux-6", "CentOS Linux-7", "CentOS Linux-8", "CentOS Stream-8", "Rocky Linux-8", "Rocky Linux-9", "Manjaro Linux-", "Fedora-33", "Fedora-34", "Fedora Linux-35", "Fedora Linux-36", "Fedora Linux-37", "Fedora Linux-38", "Fedora Linux-39", "Fedora Linux-40", "Fedora Linux-41", "Ubuntu-16.04", "Ubuntu-18.04", "Ubuntu-20.04", "Ubuntu-22.04", "Ubuntu-24.04"), path = NULL, verbose = TRUE, md5.check = TRUE, secure.http = TRUE )
os |
If |
path |
character. The install path. If |
verbose |
Logical. Verbose output if |
md5.check |
Logical. If |
secure.http |
Logical. Use secure http (ie |
Return TRUE
if installation was sucessful and FALSE
if
not.
Havard Rue hrue@r-inla.org
## Not run: inla.binary.install() inla.binary.install(os = "CentOS Linux-7") inla.binary.install(os = "CentOS Linux-7", path = "~/local/bin/inla.binary") ## End(Not run)
## Not run: inla.binary.install() inla.binary.install(os = "CentOS Linux-7") inla.binary.install(os = "CentOS Linux-7", path = "~/local/bin/inla.binary") ## End(Not run)
List the recent changes in the inla-program and its R-interface
inla.changelog()
inla.changelog()
Havard Rue hrue@r-inla.org
inla.collect.results
collect results from a inla-call
inla.collect.results( results.dir, debug = FALSE, only.hyperparam = FALSE, file.log = NULL, file.log2 = NULL, silent = inla.getOption("silent") )
inla.collect.results( results.dir, debug = FALSE, only.hyperparam = FALSE, file.log = NULL, file.log2 = NULL, silent = inla.getOption("silent") )
results.dir |
The directory where the results of the inla run are stored |
debug |
Logical. If |
only.hyperparam |
Binary variable indicating wheather only the results for the hyperparameters should be collected |
file.log |
Character. The filename, if any, of the logfile for the internal calculations |
file.log2 |
Character. The filename, if any, of the logfile2 for the internal calculations |
silent |
Internal use only |
This function is mainly used inside inla
to collect results after
running the inla function. It can also be used to collect results into R
after having run an inla section outside R.
The function returns an object of class "inla"
, see the help
file for inla
for details.
Tools to convert a Cox proportional hazard model into Poisson regression
inla.coxph(formula, data, control.hazard = list(), debug = FALSE, tag = "") inla.rbind.data.frames(...)
inla.coxph(formula, data, control.hazard = list(), debug = FALSE, tag = "") inla.rbind.data.frames(...)
formula |
The formula for the coxph model where the response must be a
|
data |
All the data used in the formula, as a list. |
control.hazard |
Control the model for the baseline-hazard; see
|
debug |
Print debug-information |
tag |
An optional tag added to the names of the new variables created
(to make them unique when combined with several calls of |
... |
Data.frames to be |
inla.coxph
returns a list of new expanded variables to be
used in the inla
-call. Note that element data
and
data.list
needs to be merged into a list
to be passed as the
data
argument. See the example for details.
inla.rbind.data.frames
returns the rbinded data.frames padded with
NAs. There is a better implementation in dplyr::bind_rows
, which is
used if package dplyr
is installed.
Havard Rue hrue@r-inla.org
## How the cbind.data.frames works: df1 = data.frame(x=1:2, y=2:3, z=3:4) df2 = data.frame(x=3:4, yy=4:5, zz=5:6) inla.rbind.data.frames(df1, df2) ## Standard example of how to convert a coxph into a Poisson regression n = 1000 x = runif(n) lambda = exp(1+x) y = rexp(n, rate=lambda) event = rep(1,n) data = list(y=y, event=event, x=x) y.surv = inla.surv(y, event) intercept1 = rep(1, n) p = inla.coxph(y.surv ~ -1 + intercept1 + x, list(y.surv = y.surv, x=x, intercept1 = intercept1)) r = inla(p$formula, family = p$family, data=c(as.list(p$data), p$data.list), E = p$E) summary(r) ## How to use this in a joint model intercept2 = rep(1, n) y = 1 + x + rnorm(n, sd=0.1) df = data.frame(intercept2, x, y) ## new need to cbind the data.frames, and then add the list-part of ## the data df.joint = c(as.list(inla.rbind.data.frames(p$data, df)), p$data.list) df.joint$Y = cbind(df.joint$y..coxph, df.joint$y) ## merge the formulas, recall to add '-1' and to use the new joint ## reponse 'Y' formula = update(p$formula, Y ~ intercept2 -1 + .) rr = inla(formula, family = c(p$family, "gaussian"), data = df.joint, E = df.joint$E..coxph) ## A check that automatic and manual approach gives the same result data(Leuk) ## add some random stuff for testing. Note that variables needs to ## be in 'data' as they are expanded Leuk$off <- runif(nrow(Leuk), min = -0.5, max = 0.5) Leuk$off.form <- runif(nrow(Leuk), min = -0.5, max = 0.5) Leuk$w <- runif(nrow(Leuk), min = 0.5, max = 1.0) formula <- inla.surv(time, cens) ~ sex + age + wbc + tpi + offset(off.form) r <- inla(formula, family = "coxph", data = Leuk, offset = off, weights = w) cph <- inla.coxph(formula = formula, data = Leuk) cph.data = c(as.list(cph$data), cph$data.list) rr <- inla(cph$formula, family = cph$family, data = cph.data, E = cph$E, offset = off, weights = w) print(cbind(r$mlik, rr$mlik, r$mlik - rr$mlik))
## How the cbind.data.frames works: df1 = data.frame(x=1:2, y=2:3, z=3:4) df2 = data.frame(x=3:4, yy=4:5, zz=5:6) inla.rbind.data.frames(df1, df2) ## Standard example of how to convert a coxph into a Poisson regression n = 1000 x = runif(n) lambda = exp(1+x) y = rexp(n, rate=lambda) event = rep(1,n) data = list(y=y, event=event, x=x) y.surv = inla.surv(y, event) intercept1 = rep(1, n) p = inla.coxph(y.surv ~ -1 + intercept1 + x, list(y.surv = y.surv, x=x, intercept1 = intercept1)) r = inla(p$formula, family = p$family, data=c(as.list(p$data), p$data.list), E = p$E) summary(r) ## How to use this in a joint model intercept2 = rep(1, n) y = 1 + x + rnorm(n, sd=0.1) df = data.frame(intercept2, x, y) ## new need to cbind the data.frames, and then add the list-part of ## the data df.joint = c(as.list(inla.rbind.data.frames(p$data, df)), p$data.list) df.joint$Y = cbind(df.joint$y..coxph, df.joint$y) ## merge the formulas, recall to add '-1' and to use the new joint ## reponse 'Y' formula = update(p$formula, Y ~ intercept2 -1 + .) rr = inla(formula, family = c(p$family, "gaussian"), data = df.joint, E = df.joint$E..coxph) ## A check that automatic and manual approach gives the same result data(Leuk) ## add some random stuff for testing. Note that variables needs to ## be in 'data' as they are expanded Leuk$off <- runif(nrow(Leuk), min = -0.5, max = 0.5) Leuk$off.form <- runif(nrow(Leuk), min = -0.5, max = 0.5) Leuk$w <- runif(nrow(Leuk), min = 0.5, max = 1.0) formula <- inla.surv(time, cens) ~ sex + age + wbc + tpi + offset(off.form) r <- inla(formula, family = "coxph", data = Leuk, offset = off, weights = w) cph <- inla.coxph(formula = formula, data = Leuk) cph.data = c(as.list(cph$data), cph$data.list) rr <- inla(cph$formula, family = cph$family, data = cph.data, E = cph$E, offset = off, weights = w) print(cbind(r$mlik, rr$mlik, r$mlik - rr$mlik))
Improve the estimates of the CPO/PIT-values be recomputing the model-fit by removing data-points.
inla.cpo( result, force = FALSE, mc.cores = NULL, verbose = TRUE, recompute.mode = TRUE )
inla.cpo( result, force = FALSE, mc.cores = NULL, verbose = TRUE, recompute.mode = TRUE )
result |
An object of class |
force |
If TRUE, then recompute all CPO/PIT values and not just those
with |
mc.cores |
The number of cores to use in |
verbose |
Run in verbose mode? |
recompute.mode |
Should be mode (and the integration points) be recomputed when a data-point is removed or not? |
The object returned is the same as result
but the new
improved estimates of the CPO/PIT values replaced.
Havard Rue hrue@r-inla.org
n = 10 y = rnorm(n) r = inla( y ~ 1, data = data.frame(y), control.compute = list(cpo=TRUE), num.threads = "1:1" # Protect package testing from parallel execution ) rr = inla.cpo(r, force=TRUE)
n = 10 y = rnorm(n) r = inla( y ~ 1, data = data.frame(y), control.compute = list(cpo=TRUE), num.threads = "1:1" # Protect package testing from parallel execution ) rr = inla.cpo(r, force=TRUE)
in favour of
fmesher::fm_CRS()
Creates either a CRS object or an inla.CRS object, describing a coordinate reference system.
inla.CRS(..., args = NULL) inla.wkt_predef()
inla.CRS(..., args = NULL) inla.wkt_predef()
... |
Arguments passed on to |
args |
list of named proj4 arguments. |
Either an sp::CRS
object or an inla.CRS
object,
depending on if the coordinate reference system described by the parameters
can be expressed with a pure sp::CRS
object or not.
An S3 inla.CRS
object is a list, usually (but not necessarily)
containing at least one element:
crs |
The basic |
inla.wkt_predef
returns a WKT2 string defining a projection
inla.wkt_predef
returns a WKT2 string defining a projection
inla.wkt_predef()
: in favour of
fmesher::fm_wkt_predef()
Finn Lindgren finn.lindgren@gmail.com
fmesher::fm_crs()
, fmesher::fm_wkt()
,
fmesher::fm_crs_is_identical()
if (require("sf")) { crs1 <- fmesher::fm_crs("longlat_globe") crs2 <- fmesher::fm_crs("lambert_globe") crs3 <- fmesher::fm_crs("mollweide_norm") crs4 <- fmesher::fm_crs("hammer_globe") crs5 <- fmesher::fm_crs("sphere") crs6 <- fmesher::fm_crs("globe") } ## Not run: names(inla.wkt_predef()) ## End(Not run) ## Not run: names(inla.wkt_predef()) ## End(Not run)
if (require("sf")) { crs1 <- fmesher::fm_crs("longlat_globe") crs2 <- fmesher::fm_crs("lambert_globe") crs3 <- fmesher::fm_crs("mollweide_norm") crs4 <- fmesher::fm_crs("hammer_globe") crs5 <- fmesher::fm_crs("sphere") crs6 <- fmesher::fm_crs("globe") } ## Not run: names(inla.wkt_predef()) ## End(Not run) ## Not run: names(inla.wkt_predef()) ## End(Not run)
Wrapper for sp::CRS
and inla.CRS
objects to extract the
coordinate reference system argument string.
'r lifecycle::badge("deprecated")' in favour of fmesher::fm_proj4string()
,
or fmesher::fm_wkt()
for WKT2 representations.
inla.CRSargs(x, ...) inla.as.CRSargs.list(x, ...) inla.as.list.CRSargs(x, ...) inla.as.list.CRS(x, ...) inla.as.CRS.list(x, ...)
inla.CRSargs(x, ...) inla.as.CRSargs.list(x, ...) inla.as.list.CRSargs(x, ...) inla.as.list.CRS(x, ...) inla.as.CRS.list(x, ...)
x |
An |
... |
Additional arguments passed on to other methods. |
inla.as.CRSargs.list
: CRS proj4 string for name=value pair list
inla.as.list.CRSargs
: List of name=value pairs from CRS proj4 string
For inla.CRSargs
and inla.as.CRSargs.list
, a character
string with PROJ.4 arguments.
For inla.as.list.CRS
and inla.as.list.CRSargs
, a list of
name/value pairs.
For inla.as.CRS.list
, a CRS
or inla.CRS
object.
Finn Lindgren finn.lindgren@gmail.com
if (require("sf") && require("sp") && require("fmesher")) { crs0 <- fm_CRS("longlat_norm") p4s <- fm_proj4string(crs0) lst <- inla.as.list.CRSargs(p4s) crs1 <- inla.as.CRS.list(lst) lst$a <- 2 crs2 <- fm_CRS(p4s, args = lst) print(fm_proj4string(crs0)) print(fm_proj4string(crs1)) print(fm_proj4string(crs2)) }
if (require("sf") && require("sp") && require("fmesher")) { crs0 <- fm_CRS("longlat_norm") p4s <- fm_proj4string(crs0) lst <- inla.as.list.CRSargs(p4s) crs1 <- inla.as.CRS.list(lst) lst$a <- 2 crs2 <- fm_CRS(p4s, args = lst) print(fm_proj4string(crs0)) print(fm_proj4string(crs1)) print(fm_proj4string(crs2)) }
Open a new device using dev.new()
unless using RStudio
inla.dev.new(...)
inla.dev.new(...)
... |
Optional arguments to |
The value of dev.new()
if not running RStudio, otherwise
NULL
Havard Rue hrue@r-inla.org
Use
fmesher::fm_diameter()
instead.
Find an upper bound to the convex hull of a point set
inla.diameter(x, ...)
inla.diameter(x, ...)
x |
A point set as an |
... |
Additional parameters passed on to |
A scalar, upper bound for the diameter of the convex hull of the point set.
Finn Lindgren finn.lindgren@gmail.com
inla.diameter(matrix(c(0, 1, 1, 0, 0, 0, 1, 1), 4, 2))
inla.diameter(matrix(c(0, 1, 1, 0, 0, 0, 1, 1), 4, 2))
View documentation of latent, prior and likelihood models.
inla.doc(what, section, verbose = FALSE)
inla.doc(what, section, verbose = FALSE)
what |
What to view documentation about; name of latent model, name of prior, etc. (A regular expression.) |
section |
An optional section, like |
verbose |
Logical If |
Havard Rue hrue@r-inla.org
www.r-inla.org
## Not run: inla.doc("rw2") ## Not run: inla.doc("gaussian", section = "prior")
## Not run: inla.doc("rw2") ## Not run: inla.doc("gaussian", section = "prior")
Return the path to the cgeneric-library for a pre-compiled external package
inla.external.lib(package)
inla.external.lib(package)
package |
the name of a package, given as a name or literal character string |
This function returns the complete path or NULL
if file does
not exists
Havard Rue hrue@r-inla.org
Extract elements by wildcard name matching from a data.frame
,
list
, or matrix
.
inla.extract.el(M, ...) ## S3 method for class 'matrix' inla.extract.el(M, match, by.row = TRUE, ...) ## S3 method for class 'data.frame' inla.extract.el(M, match, by.row = TRUE, ...) ## S3 method for class 'list' inla.extract.el(M, match, ...)
inla.extract.el(M, ...) ## S3 method for class 'matrix' inla.extract.el(M, match, by.row = TRUE, ...) ## S3 method for class 'data.frame' inla.extract.el(M, match, by.row = TRUE, ...) ## S3 method for class 'list' inla.extract.el(M, match, ...)
M |
A container object. |
... |
Additional arguments, not used. |
match |
A regex defining the matching criterion. |
by.row |
If |
Finn Lindgren finn.lindgren@gmail.com
Use the methods in the
fmesher
package
instead; see details below.
Low level function for computing finite element matrices, spherical harmonics, B-splines, and point mappings with barycentric triangle coordinates.
inla.fmesher.smorg( loc, tv, fem = NULL, aniso = NULL, gradients = FALSE, sph0 = deprecated(), sph = deprecated(), bspline = NULL, points2mesh = NULL, splitlines = NULL, output = NULL, keep = FALSE )
inla.fmesher.smorg( loc, tv, fem = NULL, aniso = NULL, gradients = FALSE, sph0 = deprecated(), sph = deprecated(), bspline = NULL, points2mesh = NULL, splitlines = NULL, output = NULL, keep = FALSE )
loc |
3-column triangle vertex coordinate matrix. |
tv |
3-column triangle vertex index matrix. |
fem |
|
aniso |
|
gradients |
|
sph0 |
|
sph |
|
bspline |
|
points2mesh |
|
splitlines |
|
output |
Names of objects to be included in the output, if different from defaults. |
keep |
When |
A list of generated named quantities.
Finn Lindgren finn.lindgren@gmail.com
Use
fmesher::fm_generate_colors()
instead.
Generates a tex RGB color specification matrix based on a color palette.
inla.generate.colors( color, color.axis = NULL, color.n = 512, color.palette = cm.colors, color.truncate = FALSE, alpha = NULL )
inla.generate.colors( color, color.axis = NULL, color.n = 512, color.palette = cm.colors, color.truncate = FALSE, alpha = NULL )
color |
|
color.axis |
The min/max limit values for the color mapping. |
color.n |
The number of colors to use in the color palette. |
color.palette |
A color palette function. |
color.truncate |
If |
alpha |
Transparency/opaqueness values. |
Finn Lindgren finn.lindgren@gmail.com
A function which return the internal environment used by INLA
inla.get.inlaEnv()
inla.get.inlaEnv()
This function returns the internal environment used by INLA to keep internal variables.
Havard Rue hrue@r-inla.org
inla.group
group or cluster covariates so to reduce the number of
unique values
inla.group(x, n = 25, method = c("cut", "quantile"), idx.only = FALSE)
inla.group(x, n = 25, method = c("cut", "quantile"), idx.only = FALSE)
x |
The vector of covariates to group. |
n |
Number of classes or bins to group into. |
method |
Group either using bins with equal length intervals
( |
idx.only |
Option to return the index only and not the |
inla.group
return the new grouped covariates where the
classes are set to the median of all the covariates belonging to that group.
Havard Rue hrue@r-inla.org
## this gives groups 3 and 8 x = 1:10 x.group = inla.group(x, n = 2) ## this is the intended use, to reduce the number of unique values in ## the of first argument of f() n = 100 x = rnorm(n) y = x + rnorm(n) result = inla(y ~ f(inla.group(x, n = 20), model = "iid"), data=data.frame(y=y,x=x))
## this gives groups 3 and 8 x = 1:10 x.group = inla.group(x, n = 2) ## this is the intended use, to reduce the number of unique values in ## the of first argument of f() n = 100 x = rnorm(n) y = x + rnorm(n) result = inla(y ~ f(inla.group(x, n = 20), model = "iid"), data=data.frame(y=y,x=x))
From a fitted model, compute and add the group.cv
-values
inla.group.cv( result, group.cv = NULL, num.level.sets = -1, strategy = c("posterior", "prior"), size.max = 32, groups = NULL, selection = NULL, group.selection = NULL, friends = NULL, weights = NULL, verbose = FALSE, epsilon = 0.005, prior.diagonal = 1e-04, keep = NULL, remove = NULL, remove.fixed = TRUE )
inla.group.cv( result, group.cv = NULL, num.level.sets = -1, strategy = c("posterior", "prior"), size.max = 32, groups = NULL, selection = NULL, group.selection = NULL, friends = NULL, weights = NULL, verbose = FALSE, epsilon = 0.005, prior.diagonal = 1e-04, keep = NULL, remove = NULL, remove.fixed = TRUE )
result |
An object of class |
group.cv |
If given, the groups are taken from this argument.
|
num.level.sets |
Number of level.sets to use. The default value
|
strategy |
One of |
size.max |
The maximum size (measure in the number of nodes) of a group. If the computed
group-size is larger, it will be truncated to |
groups |
An (optional) predefined list of groups. See the vignette for details. |
selection |
An optional list of data-indices to use. If not given, then all data are used. |
group.selection |
An optional list of data-indices to use when building the
groups. If given, each group beyond the observation itself, must be a subset of
|
friends |
An optional list of lists of indices to use a friends |
weights |
An optional positive weight attached to each datapoint. The sume
of the weights define the size of the group. If |
verbose |
Run with |
epsilon |
Two correlations with a difference less than |
prior.diagonal |
When |
keep |
For |
remove |
For |
remove.fixed |
For |
The object returned is list related to leave-group-out cross-validation. See the vignette for details.
Havard Rue hrue@r-inla.org
Detect whether PROJ6 is available for INLA. Deprecated and always returns TRUE
.
inla.has_PROJ6() inla.not_for_PROJ6(fun) inla.not_for_PROJ4(fun) inla.fallback_PROJ6(fun) inla.requires_PROJ6(fun)
inla.has_PROJ6() inla.not_for_PROJ6(fun) inla.not_for_PROJ4(fun) inla.fallback_PROJ6(fun) inla.requires_PROJ6(fun)
fun |
The name of the calling function |
inla.has_PROJ6
is called to check if PROJ6&GDAL3 are available.
For inla.has_PROJ6
, always returns TRUE
. Previously: logical; TRUE
if PROJ6 is available,
FALSE
otherwise
inla.not_for_PROJ6()
:
Called to warn about using old PROJ4
features even though PROJ6 is available
inla.not_for_PROJ4()
:
Called to give an error when
calling methods that are only available for PROJ6
inla.fallback_PROJ6()
:
Called to warn about falling back
to using old PROJ4 methods when a PROJ6 method hasn't been implemented
inla.requires_PROJ6()
:
Called to give an error when PROJ6
is required but not available
## Not run: inla.has_PROJ6() ## End(Not run)
## Not run: inla.has_PROJ6() ## End(Not run)
Improve the estimates of the posterior marginals for the hyperparameters of the model using the grid integration strategy. (classic-mode only)
inla.hyperpar( result, skip.configurations = TRUE, verbose = FALSE, dz = 0.75, diff.logdens = 15, h = NULL, restart = FALSE, quantiles = NULL, keep = FALSE )
inla.hyperpar( result, skip.configurations = TRUE, verbose = FALSE, dz = 0.75, diff.logdens = 15, h = NULL, restart = FALSE, quantiles = NULL, keep = FALSE )
result |
An object of class |
skip.configurations |
A boolean variable; skip configurations if the values at the main axis are to small. (Default TRUE) |
verbose |
Boolean indicating wheather the inla program should run in a verbose mode. |
dz |
Step length in the standardized scale used in the construction of the grid, default 0.75. |
diff.logdens |
The difference of the log.density for the hyperpameters to stop numerical integration using int.strategy='grid'. Default 15 |
h |
The step-length for the gradient calculations for the hyperparameters. Default 0.01. |
restart |
A boolean defining whether the optimizer should start again
to ind the mode or if it should use the mode contained in the |
quantiles |
A vector of quantiles, to compute for each posterior marginal. |
keep |
A boolean variable indicating the working files (ini file, data files and results files) should be kept |
The object returned is the same as object
but the estimates
of the hyperparameters are replaced by improved estimates.
This function might take a long time or if the number of
hyperparameters in the model is large. If it complains and says I cannot get enough memory
, try to increase the value of the argument
dz
or decrease diff.logdens
.
Havard Rue hrue@r-inla.org
See the references in inla
Produce samples from the approximated joint posterior for the hyperparameters
inla.hyperpar.sample(n, result, intern = FALSE, improve.marginals = FALSE)
inla.hyperpar.sample(n, result, intern = FALSE, improve.marginals = FALSE)
n |
Integer. Number of samples required. |
result |
An |
intern |
Logical. If |
improve.marginals |
Logical. If |
A matrix where each sample is a row. The contents of the column is described in the rownames.
Havard Rue hrue@r-inla.org
n = 100 r = inla(y ~ 1 + f(idx), data = data.frame(y=rnorm(n), idx = 1:n)) ns = 500 x = inla.hyperpar.sample(ns, r) rr = inla.hyperpar(r) xx = inla.hyperpar.sample(ns, rr, improve.marginals=TRUE)
n = 100 r = inla(y ~ 1 + f(idx), data = data.frame(y=rnorm(n), idx = 1:n)) ns = 500 x = inla.hyperpar.sample(ns, r) rr = inla.hyperpar(r) xx = inla.hyperpar.sample(ns, rr, improve.marginals=TRUE)
Use
fmesher::fm_crs_is_identical()
instead.
Wrapper for identical, optionally testing only the CRS part of two objects
Deprecated in favour of fmesher::fm_crs_is_identical()
inla.identical.CRS(...)
inla.identical.CRS(...)
... |
Arguments passed on to |
iidkd
component (experimental)This function provide samples of the iidkd
component using more
interpretable parameters
inla.iidkd.sample(n = 10^4, result, name, return.cov = FALSE)
inla.iidkd.sample(n = 10^4, result, name, return.cov = FALSE)
n |
Integer Number of samples to use |
result |
inla-object An object of class |
name |
Character The name of the |
return.cov |
Logical Return samples of the covariance matrix instead of stdev/correlation matrix described below? |
A list of sampled matrices, with (default) correlations on the off-diagonal and standard-deviations on the diagonal
Havard Rue hrue@r-inla.org
inla.doc("iidkd")
It implements the models in Knorr-Held, L. (2000) with three different constraint approaches: sum-to-zero, contrast or diagonal add.
inla.knmodels( formula, progress = FALSE, control.st = list(time, space, spacetime, graph, type = c(paste(1:4), paste0(2:4, "c"), paste0(2:4, "d")), diagonal = 1e-05, timeref = 1, spaceref = 1), ..., envir = parent.frame() )
inla.knmodels( formula, progress = FALSE, control.st = list(time, space, spacetime, graph, type = c(paste(1:4), paste0(2:4, "c"), paste0(2:4, "d")), diagonal = 1e-05, timeref = 1, spaceref = 1), ..., envir = parent.frame() )
formula |
The formula specifying the other model components, without
the spacetime interaction term. The spacetime interaction term will be added
accordly to the specification in the |
progress |
If it is to be shown the model fitting progress. Useful if more than one interaction type is being fitted. |
control.st |
Named list of arguments to control the spacetime interaction. It should contain:
|
... |
Arguments to be passed to the |
envir |
Environment in which to evaluate the ... arguments. |
inla.knmodels
returns an object of class "inla"
. or a
list of objects of this class if it is asked to compute more than one
interaction type at once. Note: when the model type is 2c, 3c, 4c, 2d, 3d
or 4d, it also includes linear combinations summary.
Elias T. Krainski
inla.knmodels.sample()
to sample from
### define space domain as a grid grid <- sp::SpatialGrid(sp::GridTopology(c(0,0), c(1, 1), c(4, 5))) (n <- nrow(xy <- sp::coordinates(grid))) ### build a spatial neighborhood list jj <- lapply(1:n, function(i) which(sqrt((xy[i,1]-xy[,1])^2 + (xy[i,2]-xy[,2])^2)==1)) ### build the spatial adjacency matrix graph <- sparseMatrix(rep(1:n, sapply(jj, length)), unlist(jj), x=1, dims=c(n, n)) ### some random data at 10 time point dat <- inla.knmodels.sample(graph, m=10, tau.t=2, tau.s=2, tau.st=3) str(dat) sapply(dat$x, summary) nd <- length(dat$x$eta) dat$e <- runif(nd, 0.9, 1.1)*rgamma(n, 40, 2) dat$y <- rpois(nd, dat$e*exp(dat$x$eta-3)) summary(dat$y) ### fit the type 4 considering three different approaches tgraph <- sparseMatrix(i=c(2:10, 1:9), j=c(1:9, 2:10), x=1) res <- inla.knmodels(y ~ f(time, model='bym2', graph=tgraph) + f(space, model='bym2', graph=graph), data=dat, family='poisson', E=dat$E, progress=TRUE, control.st=list(time=time, space=space, spacetime=spacetime, graph=graph, type=c(4, '4c')), control.compute=list(dic=TRUE, waic=TRUE, cpo=TRUE)) sapply(res, function(x) c(dic=x$dic$dic, waic=x$waic$waic, cpo=-sum(log(x$cpo$cpo))))
### define space domain as a grid grid <- sp::SpatialGrid(sp::GridTopology(c(0,0), c(1, 1), c(4, 5))) (n <- nrow(xy <- sp::coordinates(grid))) ### build a spatial neighborhood list jj <- lapply(1:n, function(i) which(sqrt((xy[i,1]-xy[,1])^2 + (xy[i,2]-xy[,2])^2)==1)) ### build the spatial adjacency matrix graph <- sparseMatrix(rep(1:n, sapply(jj, length)), unlist(jj), x=1, dims=c(n, n)) ### some random data at 10 time point dat <- inla.knmodels.sample(graph, m=10, tau.t=2, tau.s=2, tau.st=3) str(dat) sapply(dat$x, summary) nd <- length(dat$x$eta) dat$e <- runif(nd, 0.9, 1.1)*rgamma(n, 40, 2) dat$y <- rpois(nd, dat$e*exp(dat$x$eta-3)) summary(dat$y) ### fit the type 4 considering three different approaches tgraph <- sparseMatrix(i=c(2:10, 1:9), j=c(1:9, 2:10), x=1) res <- inla.knmodels(y ~ f(time, model='bym2', graph=tgraph) + f(space, model='bym2', graph=graph), data=dat, family='poisson', E=dat$E, progress=TRUE, control.st=list(time=time, space=space, spacetime=spacetime, graph=graph, type=c(4, '4c')), control.compute=list(dic=TRUE, waic=TRUE, cpo=TRUE)) sapply(res, function(x) c(dic=x$dic$dic, waic=x$waic$waic, cpo=-sum(log(x$cpo$cpo))))
It implements the sampling method for the models in Knorr-Held, L. (2000) considering the algorithm 3.1 in Rue & Held (2005) book.
inla.knmodels.sample( graph, m, type = 4, intercept = 0, tau.t = 1, phi.t = 0.7, tau.s = 1, phi.s = 0.7, tau.st = 1, ev.t = NULL, ev.s = NULL )
inla.knmodels.sample( graph, m, type = 4, intercept = 0, tau.t = 1, phi.t = 0.7, tau.s = 1, phi.s = 0.7, tau.st = 1, ev.t = NULL, ev.s = NULL )
graph |
Model graph definition |
m |
Time dimention. |
type |
Integer from 1 to 4 to identify one of the four interaction type. |
intercept |
A constant to be added to the linear predictor |
tau.t |
Precision parameter for the main temporal effect. |
phi.t |
Mixing parameter in the |
tau.s |
Precision parameter for the main spatial effect. |
phi.s |
Mixing parameter in the |
tau.st |
Precision parameter for the spacetime effect. |
ev.t |
Eigenvalues and eigenvectors of the temporal precision matrix structure. |
ev.s |
Eigenvalues and eigenvectors of the spatial precision matrix structure. |
A list with the following elements
time |
The time index for
each obervation, with length equals |
space |
The spatial index for
each observation, with length equals |
spacetime |
The spacetime
index for each obervation, with length equals |
x |
A list with the following elements |
t.iid |
The unstructured main temporal effect part. |
t.str |
The structured main temporal effect part. |
t |
The
main temporal effect with length equals |
s.iid |
The unstructured main spatial effect part. |
s.str |
The structured main spatial effect part. |
s |
The main spatial effect with length equals |
st |
The spacetime interaction effect with length |
eta |
The linear predictor with length |
Elias T. Krainski
inla.knmodels()
for model fitting
Illustrate a one-sample Kolmogorov-Smirnov test by plotting the empirical distribution deviation.
inla.ks.plot(x, y, diff = TRUE, ...)
inla.ks.plot(x, y, diff = TRUE, ...)
x |
a numeric vector of data values. |
y |
a cumulative distribution function such as 'pnorm'. |
diff |
logical, indicating if the normalised difference should be
plotted. If |
... |
additional arguments for |
In addition to the (normalised) empirical distribution deviation, lines for
the K-S test statistic are drawn, as well as two standard
deviations around the expectation under the null hypothesis.
A list with class "htest"
, as generated by
ks.test()
Finn Lindgren finn.lindgren@gmail.com
## Check for N(0,1) data data = rowSums(matrix(runif(100*12)*2-1,100,12))/2 inla.ks.plot(data, pnorm) ## Not run: ## Check the goodness-of-fit of cross-validated predictions result = inla(..., control.predictor=list(cpo=TRUE)) inla.ks.plot(result$pit, punif) ## End(Not run)
## Check for N(0,1) data data = rowSums(matrix(runif(100*12)*2-1,100,12))/2 inla.ks.plot(data, pnorm) ## Not run: ## Check the goodness-of-fit of cross-validated predictions result = inla(..., control.predictor=list(cpo=TRUE)) inla.ks.plot(result$pit, punif) ## End(Not run)
This function return function to compute the pdf,cdf,quantiles, or samples for new data using the likelihood from a inla-object.
inla.likelihood(type = c("d", "p", "r", "q", "s"), args)
inla.likelihood(type = c("d", "p", "r", "q", "s"), args)
type |
The returned function type. The definition is similar to "rnorm","dnorm","pnorm",and "dnorm". |
args |
It is usually a return value from "inla.likelihood.parser", which specifies parameters, link function and transformation function of hyperparameters. |
value goes here
Havard Rue hrue@r-inla.org
List available model components, likelihoods, priors, etc. To read specific
documentation for the individual elements, use inla.doc()
.
The list is cat
'ed with ...
arguments.
This function is EXPERIMENTAL.
inla.list.models(section = names(inla.models()), ...)
inla.list.models(section = names(inla.models()), ...)
section |
The section(s) to list, missing |
... |
Additional argument to |
Nothing is returned
Havard Rue
## Not run: inla.list.models("likelihood") inla.list.models(c("prior", "group")) inla.list.models(file=file("everything.txt")) #Show detailed doc for a specific prior/likelihood/latent model inla.doc("binomial") ## End(Not run)
## Not run: inla.list.models("likelihood") inla.list.models(c("prior", "group")) inla.list.models(file=file("everything.txt")) #Show detailed doc for a specific prior/likelihood/latent model inla.doc("binomial") ## End(Not run)
Calculates covariance and correlation functions for Matern models and
related oscillating SPDE models, on and on the sphere,
.
inla.matern.cov( nu, kappa, x, d = 1, corr = FALSE, norm.corr = FALSE, theta, epsilon = 1e-08 ) inla.matern.cov.s2(nu, kappa, x, norm.corr = FALSE, theta = 0, freq.max = NULL)
inla.matern.cov( nu, kappa, x, d = 1, corr = FALSE, norm.corr = FALSE, theta, epsilon = 1e-08 ) inla.matern.cov.s2(nu, kappa, x, norm.corr = FALSE, theta = 0, freq.max = NULL)
nu |
The Matern smoothness parameter. |
kappa |
The spatial scale parameter. |
x |
Distance values. |
d |
Space dimension; the domain is |
corr |
If |
norm.corr |
If |
theta |
Oscillation strength parameter. |
epsilon |
Tolerance for detecting points close to distance zero. |
freq.max |
The maximum allowed harmonic order. Current default 40, to be changed to a dynamic choice based on error bounds. |
On , the models are defined by the spectral density
given by
On , the models are defined by the spectral
coefficients
Finn Lindgren finn.lindgren@gmail.com
This defines an mdata-object for matrix valued response-families
inla.mdata(y, ...) ## S3 method for class 'inla.mdata' print(x, ...) as.inla.mdata(object) is.inla.mdata(object)
inla.mdata(y, ...) ## S3 method for class 'inla.mdata' print(x, ...) as.inla.mdata(object) is.inla.mdata(object)
y |
The response vector/matrix |
... |
Additional vectors/matrics of same length as |
x |
An mdata object |
object |
Any |
An object of class inla.mdata
. There is method for
print
.
is.inla.mdata
returns TRUE
if object
inherits from
class inla.mdata
, otherwise FALSE
.
as.inla.mdata
returns an object of class inla.mdata
It is often required to set Y=inla.mdata(...)
and then define
the formula as Y~...
, especially when used with inla.stack
.
Havard Rue
Use
fmesher::fm_mesh_1d()
instead.
Create a 1D mesh specification inla.mesh.1d
object, that defines a
function space for 1D SPDE models.
inla.mesh.1d( loc, interval = range(loc), boundary = NULL, degree = 1, free.clamped = FALSE, ... ) inla.mesh.1d.fem(mesh)
inla.mesh.1d( loc, interval = range(loc), boundary = NULL, degree = 1, free.clamped = FALSE, ... ) inla.mesh.1d.fem(mesh)
loc |
B-spline knot locations. |
interval |
Interval domain endpoints. |
boundary |
Boundary condition specification. Valid conditions are
|
degree |
The B-spline basis degree. Supported values are 0, 1, and 2. |
free.clamped |
If |
... |
Additional option, currently unused. |
mesh |
An inla.mesh.1d object |
inla.mesh.1d.fem()
:
Use
fmesher::fm_fem()
instead.
Finn Lindgren finn.lindgren@gmail.com
Use
fmesher::fm_basis()
instead.
Calculates barycentric coordinates and weight matrices for
inla.mesh.1d()
objects.
inla.mesh.1d.bary(mesh, loc, method = c("linear", "nearest")) inla.mesh.1d.A(mesh, loc, weights = NULL, derivatives = NULL, method = NULL)
inla.mesh.1d.bary(mesh, loc, method = c("linear", "nearest")) inla.mesh.1d.A(mesh, loc, weights = NULL, derivatives = NULL, method = NULL)
mesh |
An |
loc |
Coordinate values. |
method |
Interpolation method. If not specified for
|
weights |
Weights to be applied to the |
derivatives |
If |
inla.mesh.1d.bary()
:
Use
fmesher::fm_bary()
instead.
Finn Lindgren finn.lindgren@gmail.com
Use
fmesher::fm_mesh_2d_inla()
instead.
Create a triangle mesh based on initial point locations, specified or automatic boundaries, and mesh quality parameters.
inla.mesh.2d( loc = NULL, loc.domain = NULL, offset = NULL, n = NULL, boundary = NULL, interior = NULL, max.edge = NULL, min.angle = NULL, cutoff = 1e-12, max.n.strict = NULL, max.n = NULL, plot.delay = NULL, crs = NULL )
inla.mesh.2d( loc = NULL, loc.domain = NULL, offset = NULL, n = NULL, boundary = NULL, interior = NULL, max.edge = NULL, min.angle = NULL, cutoff = 1e-12, max.n.strict = NULL, max.n = NULL, plot.delay = NULL, crs = NULL )
loc |
Matrix of point locations to be used as initial triangulation
nodes. Can alternatively be a |
loc.domain |
Matrix of point locations used to determine the domain
extent. Can alternatively be a |
offset |
The automatic extension distance. One or two values, for an inner and an optional outer extension. If negative, interpreted as a factor relative to the approximate data diameter (default=-0.10???) |
n |
The number of initial nodes in the automatic extensions (default=16) |
boundary |
A list of one or two |
interior |
An |
max.edge |
The largest allowed triangle edge length. One or two values. |
min.angle |
The smallest allowed triangle angle. One or two values. (Default=21) |
cutoff |
The minimum allowed distance between points. Point at most as far apart as this are replaced by a single vertex prior to the mesh refinement step. |
max.n.strict |
The maximum number of vertices allowed, overriding
|
max.n |
The maximum number of vertices allowed, overriding
|
plot.delay |
On Linux (and Mac if appropriate X11 libraries are
installed), specifying a nonnegative numeric value activates a rudimentary
plotting system in the underlying On all systems, specifying any negative value activates displaying the result after each step of the multi-step domain extension algorithm. |
crs |
An optional |
An inla.mesh
object.
Finn Lindgren finn.lindgren@gmail.com
inla.mesh.create()
, inla.delaunay()
,
inla.nonconvex.hull()
loc <- matrix(runif(10 * 2), 10, 2) if (require("splancs")) { boundary <- list( inla.nonconvex.hull(loc, 0.1, 0.15), inla.nonconvex.hull(loc, 0.2, 0.2) ) offset <- NULL } else { boundary <- NULL offset <- c(0.1, 0.2) } mesh <- inla.mesh.2d(loc, boundary = boundary, offset = offset, max.edge = c(0.05, 0.1)) plot(mesh)
loc <- matrix(runif(10 * 2), 10, 2) if (require("splancs")) { boundary <- list( inla.nonconvex.hull(loc, 0.1, 0.15), inla.nonconvex.hull(loc, 0.2, 0.2) ) offset <- NULL } else { boundary <- NULL offset <- c(0.1, 0.2) } mesh <- inla.mesh.2d(loc, boundary = boundary, offset = offset, max.edge = c(0.05, 0.1)) plot(mesh)
Assess the finite element approximation errors in a mesh for interactive R
sessions. More detailed assessment tools are in meshbuilder()
.
inla.mesh.assessment(mesh, spatial.range, alpha = 2, dims = c(500, 500))
inla.mesh.assessment(mesh, spatial.range, alpha = 2, dims = c(500, 500))
mesh |
An |
spatial.range |
numeric; the spatial range parameter to use for the assessment |
alpha |
numeric; A valid |
dims |
2-numeric; the grid size |
Finn Lindgren finn.lindgren@gmail.com
fmesher::fm_mesh_2d()
, fmesher::fm_rcdt_2d()
, meshbuilder
library(fmesher) bnd <- fm_segm(cbind( c(0, 10, 10, 0, 0), c(0, 0, 10, 10, 0) ), is.bnd = TRUE) mesh <- fm_mesh_2d_inla(boundary = bnd, max.edge = 1) out <- inla.mesh.assessment(mesh, spatial.range = 3, alpha = 2)
library(fmesher) bnd <- fm_segm(cbind( c(0, 10, 10, 0, 0), c(0, 0, 10, 10, 0) ), is.bnd = TRUE) mesh <- fm_mesh_2d_inla(boundary = bnd, max.edge = 1) out <- inla.mesh.assessment(mesh, spatial.range = 3, alpha = 2)
Use
fmesher::fm_raw_basis()
instead.
Calculate basis functions on a 1d or 2d inla.mesh()
inla.mesh.basis( mesh, type = "b.spline", n = 3, degree = 2, knot.placement = "uniform.area", rot.inv = TRUE, boundary = "free", free.clamped = TRUE, ... )
inla.mesh.basis( mesh, type = "b.spline", n = 3, degree = 2, knot.placement = "uniform.area", rot.inv = TRUE, boundary = "free", free.clamped = TRUE, ... )
mesh |
An |
type |
|
n |
For B-splines, the number of basis functions in each direction (for
1d meshes |
degree |
Degree of B-spline polynomials. See
|
knot.placement |
For B-splines on the sphere, controls the latitudinal
placements of knots. |
rot.inv |
For spherical harmonics on a sphere, |
boundary |
Boundary specification, default is free boundaries. See
|
free.clamped |
If |
... |
Unused |
Finn Lindgren finn.lindgren@gmail.com
n <- 100 loc <- matrix(runif(n * 2), n, 2) mesh <- inla.mesh.2d(loc, max.edge = 0.05) basis <- inla.mesh.basis(mesh, n = c(4, 5)) proj <- inla.mesh.projector(mesh) image(proj$x, proj$y, inla.mesh.project(proj, basis[, 7])) if (require(rgl)) { plot(mesh, rgl = TRUE, col = basis[, 7], draw.edges = FALSE, draw.vertices = FALSE) }
n <- 100 loc <- matrix(runif(n * 2), n, 2) mesh <- inla.mesh.2d(loc, max.edge = 0.05) basis <- inla.mesh.basis(mesh, n = c(4, 5)) proj <- inla.mesh.projector(mesh) image(proj$x, proj$y, inla.mesh.project(proj, basis[, 7])) if (require(rgl)) { plot(mesh, rgl = TRUE, col = basis[, 7], draw.edges = FALSE, draw.vertices = FALSE) }
Use
fmesher::fm_segm()
instead.
Constructs an list of inla.mesh.segment
object from boundary or
interior constraint information in an inla.mesh()
object.
inla.mesh.boundary(mesh, grp = NULL) inla.mesh.interior(mesh, grp = NULL)
inla.mesh.boundary(mesh, grp = NULL) inla.mesh.interior(mesh, grp = NULL)
mesh |
An |
grp |
Group indices to extract. If |
A list of inla.mesh.segment
objects.
Finn Lindgren finn.lindgren@gmail.com
inla.mesh.segment()
, inla.mesh.create()
,
inla.mesh.create.helper()
loc <- matrix(runif(100 * 2) * 1000, 100, 2) mesh <- fmesher::fm_mesh_2d_inla(loc.domain = loc, max.edge = c(50, 500)) boundary <- inla.mesh.boundary(mesh) interior <- inla.mesh.interior(mesh)
loc <- matrix(runif(100 * 2) * 1000, 100, 2) mesh <- fmesher::fm_mesh_2d_inla(loc.domain = loc, max.edge = c(50, 500)) boundary <- inla.mesh.boundary(mesh) interior <- inla.mesh.interior(mesh)
Compute subsets of vertices and triangles
in an inla.mesh object that are
connected by edges. This function is deprecated from INLA
25.4.10
when
fmesher version 0.3.0.9005
or later is installed, which has
fm_mesh_components()
.
inla.mesh.components(mesh)
inla.mesh.components(mesh)
mesh |
An |
A list with elements vertex
and triangle
, vectors of
integer labels for which connected component they belong, and info
, a
data.frame
with columns
component |
Connected component integer label. |
nV |
The number of vertices in the component. |
nT |
The number of triangles in the component. |
area |
The surface area associated with the component. Component labels are not comparable across different meshes, but some ordering stability is guaranteed by initiating each component from the lowest numbered triangle whenever a new component is initiated. |
Finn Lindgren finn.lindgren@gmail.com
fmesher::fm_mesh_2d()
, fmesher::fm_rcdt_2d()
# Construct two simple meshes: library(fmesher) loc <- matrix(c(0, 1, 0, 1), 2, 2) mesh1 <- fm_mesh_2d(loc = loc, max.edge = 0.1) bnd <- fm_nonconvex_hull_inla(loc, 0.3) mesh2 <- fm_mesh_2d(boundary = bnd, max.edge = 0.1) # Compute connectivity information: conn1 <- inla.mesh.components(mesh1) conn2 <- inla.mesh.components(mesh2) # One component, simply connected mesh conn1$info # Two disconnected components conn2$info
# Construct two simple meshes: library(fmesher) loc <- matrix(c(0, 1, 0, 1), 2, 2) mesh1 <- fm_mesh_2d(loc = loc, max.edge = 0.1) bnd <- fm_nonconvex_hull_inla(loc, 0.3) mesh2 <- fm_mesh_2d(boundary = bnd, max.edge = 0.1) # Compute connectivity information: conn1 <- inla.mesh.components(mesh1) conn2 <- inla.mesh.components(mesh2) # One component, simply connected mesh conn1$info # Two disconnected components conn2$info
in favour of
fmesher::fm_rcdt_2d_inla()
.
Create a constrained refined Delaunay triangulation (CRDT) for a set of spatial locations.
inla.mesh.create
generates triangular meshes on subsets of
and
. Use the higher level wrapper function
inla.mesh.2d()
for greater control over mesh resolution and
coarser domain extensions.
inla.delaunay
is a wrapper function for obtaining the convex hull of
a point set and calling inla.mesh.create
to generate the classical
Delaunay tringulation.
inla.mesh.create( loc = NULL, tv = NULL, boundary = NULL, interior = NULL, extend = (missing(tv) || is.null(tv)), refine = FALSE, lattice = NULL, globe = NULL, cutoff = 1e-12, plot.delay = NULL, data.dir = NULL, keep = (!missing(data.dir) && !is.null(data.dir)), timings = FALSE, quality.spec = NULL, crs = NULL ) inla.delaunay(loc, ...)
inla.mesh.create( loc = NULL, tv = NULL, boundary = NULL, interior = NULL, extend = (missing(tv) || is.null(tv)), refine = FALSE, lattice = NULL, globe = NULL, cutoff = 1e-12, plot.delay = NULL, data.dir = NULL, keep = (!missing(data.dir) && !is.null(data.dir)), timings = FALSE, quality.spec = NULL, crs = NULL ) inla.delaunay(loc, ...)
loc |
Matrix of point locations. Can alternatively be a
|
tv |
A triangle-vertex index matrix, specifying an existing triangulation. |
boundary |
A list of |
interior |
A list of |
extend |
Setting to |
refine |
|
lattice |
An |
globe |
Subdivision resolution for a semi-regular spherical triangulation with equidistant points along equidistant latitude bands. |
cutoff |
The minimum allowed distance between points. Point at most as far apart as this are replaced by a single vertex prior to the mesh refinement step. |
plot.delay |
On Linux (and Mac if appropriate X11 libraries are
installed), specifying a numeric value activates a rudimentary plotting
system in the underlying |
data.dir |
Where to store the |
keep |
|
timings |
If |
quality.spec |
List of vectors of per vertex |
crs |
An optional |
... |
Optional parameters passed on to |
An inla.mesh
object.
inla.delaunay()
: Use
fmesher::fm_delaunay_2d()
instead.
Finn Lindgren finn.lindgren@gmail.com
inla.mesh.2d()
, inla.mesh.1d()
,
inla.mesh.segment()
, inla.mesh.lattice()
,
inla.mesh.query()
loc <- matrix(runif(10 * 2), 10, 2) mesh <- inla.delaunay(loc) plot(mesh) mesh <- inla.mesh.create(loc, interior = inla.mesh.segment(idx = 1:2), extend = TRUE, refine = list(max.edge = 0.1) ) plot(mesh) loc2 <- matrix(c(0, 1, 1, 0, 0, 0, 1, 1), 4, 2) mesh2 <- inla.mesh.create( loc = loc, boundary = inla.mesh.segment(loc2), interior = inla.mesh.segment(idx = 1:2), quality.spec = list(segm = 0.2, loc = 0.05), refine = list(min.angle = 26) ) plot(mesh2)
loc <- matrix(runif(10 * 2), 10, 2) mesh <- inla.delaunay(loc) plot(mesh) mesh <- inla.mesh.create(loc, interior = inla.mesh.segment(idx = 1:2), extend = TRUE, refine = list(max.edge = 0.1) ) plot(mesh) loc2 <- matrix(c(0, 1, 1, 0, 0, 0, 1, 1), 4, 2) mesh2 <- inla.mesh.create( loc = loc, boundary = inla.mesh.segment(loc2), interior = inla.mesh.segment(idx = 1:2), quality.spec = list(segm = 0.2, loc = 0.05), refine = list(min.angle = 26) ) plot(mesh2)
Use
fmesher::fm_basis()
instead.
Calculates directional derivative matrices for functions on
inla.mesh()
objects.
inla.mesh.deriv(mesh, loc)
inla.mesh.deriv(mesh, loc)
mesh |
An |
loc |
Coordinates where the derivatives should be evaluated. |
A |
The projection matrix, |
dx , dy , dz
|
Derivative weight matrices, |
Finn Lindgren finn.lindgren@gmail.com
Use
fmesher::fm_fem()
instead.
Constructs finite element matrices for inla.mesh()
and
inla.mesh.1d()
objects.
inla.mesh.fem(mesh, order = 2)
inla.mesh.fem(mesh, order = 2)
mesh |
An |
order |
The model order. |
A list of sparse matrices based on basis functions psi_i
:
c0 |
|
c1 |
|
g1 |
|
g2 |
|
gk |
|
Finn Lindgren finn.lindgren@gmail.com
Use
fmesher::fm_lattice_2d()
instead.
Construct a lattice grid for inla.mesh()
inla.mesh.lattice( x = seq(0, 1, length.out = 2), y = seq(0, 1, length.out = 2), z = NULL, dims = if (is.matrix(x)) { dim(x) } else { c(length(x), length(y)) }, units = NULL, crs = NULL )
inla.mesh.lattice( x = seq(0, 1, length.out = 2), y = seq(0, 1, length.out = 2), z = NULL, dims = if (is.matrix(x)) { dim(x) } else { c(length(x), length(y)) }, units = NULL, crs = NULL )
x |
vector or grid matrix of x-values |
y |
vector of grid matrix of y-values |
z |
if x is a matrix, a grid matrix of z-values |
dims |
the size of the grid, length 2 vector |
units |
One of |
crs |
An optional |
An inla.mesh.lattice
object.
Finn Lindgren finn.lindgren@gmail.com
lattice <- inla.mesh.lattice(seq(0, 1, length.out = 17), seq(0, 1, length.out = 10)) ## Use the lattice "as-is", without refinement: mesh <- inla.mesh.create(lattice = lattice, boundary = lattice$segm) mesh <- inla.mesh.create(lattice = lattice, extend = FALSE) plot(mesh) ## Refine the triangulation, with limits on triangle angles and edges: mesh <- inla.mesh.create( lattice = lattice, refine = list(max.edge = 0.08), extend = FALSE ) plot(mesh) ## Add an extension around the lattice, but maintain the lattice edges: mesh <- inla.mesh.create( lattice = lattice, refine = list(max.edge = 0.08), interior = lattice$segm ) plot(mesh) ## Only add extension: mesh <- inla.mesh.create(lattice = lattice, refine = list(max.edge = 0.08)) plot(mesh)
lattice <- inla.mesh.lattice(seq(0, 1, length.out = 17), seq(0, 1, length.out = 10)) ## Use the lattice "as-is", without refinement: mesh <- inla.mesh.create(lattice = lattice, boundary = lattice$segm) mesh <- inla.mesh.create(lattice = lattice, extend = FALSE) plot(mesh) ## Refine the triangulation, with limits on triangle angles and edges: mesh <- inla.mesh.create( lattice = lattice, refine = list(max.edge = 0.08), extend = FALSE ) plot(mesh) ## Add an extension around the lattice, but maintain the lattice edges: mesh <- inla.mesh.create( lattice = lattice, refine = list(max.edge = 0.08), interior = lattice$segm ) plot(mesh) ## Only add extension: mesh <- inla.mesh.create(lattice = lattice, refine = list(max.edge = 0.08)) plot(mesh)
inla.mesh
projections. Use
fmesher::fm_mesh_2d_map()
instead.
Calculates coordinate mappings for inla.mesh
projections.
inla.mesh.map.lim( loc = NULL, projection = c("default", "longlat", "longsinlat", "mollweide") ) inla.mesh.map( loc, projection = c("default", "longlat", "longsinlat", "mollweide"), inverse = TRUE )
inla.mesh.map.lim( loc = NULL, projection = c("default", "longlat", "longsinlat", "mollweide") ) inla.mesh.map( loc, projection = c("default", "longlat", "longsinlat", "mollweide"), inverse = TRUE )
loc |
Coordinates to be mapped. |
projection |
The projection type. |
inverse |
If |
For inla.mesh.map.lim
, a list:
xlim |
X axis limits in the map domain |
ylim |
Y axis limits in the map domain |
No attempt is made to find minimal limits for partial spherical domains.
inla.mesh.map.lim()
: Use
fmesher::fm_mesh_2d_map_lim()
instead.
Projection extent limit calculations
Finn Lindgren finn.lindgren@gmail.com
Use
fmesher::fm_evaluate()
and
fmesher::fm_evaluator()
instead.
Calculate a lattice projection to/from an inla.mesh()
.
The call inla.mesh.project(mesh, loc, field=..., ...)
, is a shortcut
to inla.mesh.project(inla.mesh.projector(mesh, loc), field)
.
inla.mesh.project(...) inla.mesh.projector(...)
inla.mesh.project(...) inla.mesh.projector(...)
... |
Arguments passed on to |
For inla.mesh.project(mesh, ...)
, a list with projection
information. For inla.mesh.projector(mesh, ...)
, an
inla.mesh.projector
object. For inla.mesh.project(projector, field, ...)
, a field projected from the mesh onto the locations given by
the projector object.
Finn Lindgren finn.lindgren@gmail.com
inla.mesh()
, inla.mesh.1d()
,
inla.mesh.lattice()
n <- 20 loc <- matrix(runif(n * 2), n, 2) mesh <- inla.mesh.create(loc, refine = list(max.edge = 0.05)) proj <- inla.mesh.projector(mesh) field <- cos(mesh$loc[, 1] * 2 * pi * 3) * sin(mesh$loc[, 2] * 2 * pi * 7) image(proj$x, proj$y, inla.mesh.project(proj, field)) if (require(rgl)) { plot(mesh, rgl = TRUE, col = field, draw.edges = FALSE, draw.vertices = FALSE) }
n <- 20 loc <- matrix(runif(n * 2), n, 2) mesh <- inla.mesh.create(loc, refine = list(max.edge = 0.05)) proj <- inla.mesh.projector(mesh) field <- cos(mesh$loc[, 1] * 2 * pi * 3) * sin(mesh$loc[, 2] * 2 * pi * 7) image(proj$x, proj$y, inla.mesh.project(proj, field)) if (require(rgl)) { plot(mesh, rgl = TRUE, col = field, draw.edges = FALSE, draw.vertices = FALSE) }
Query information about an inla.mesh object.
inla.mesh.query(mesh, ...)
inla.mesh.query(mesh, ...)
mesh |
An |
... |
Query arguments.
|
A list of query results.
Finn Lindgren finn.lindgren@gmail.com
inla.mesh.create()
, inla.mesh.segment()
,
inla.mesh.lattice()
loc <- matrix(c(0.1, 0.15), 1, 2) lattice <- inla.mesh.lattice( seq(0, 1, length.out = 10), seq(0, 1, length.out = 10) ) mesh <- inla.mesh.create(loc = loc, lattice = lattice, extend = FALSE) vt <- which(inla.mesh.query(mesh, vt.neighbours = list( mesh$idx$loc, 4:6 ) )$vt.neighbours) mesh2 <- inla.mesh.create(mesh$loc, tv = mesh$graph$tv[vt, , drop = FALSE], refine = FALSE, extend = FALSE )
loc <- matrix(c(0.1, 0.15), 1, 2) lattice <- inla.mesh.lattice( seq(0, 1, length.out = 10), seq(0, 1, length.out = 10) ) mesh <- inla.mesh.create(loc = loc, lattice = lattice, extend = FALSE) vt <- which(inla.mesh.query(mesh, vt.neighbours = list( mesh$idx$loc, 4:6 ) )$vt.neighbours) mesh2 <- inla.mesh.create(mesh$loc, tv = mesh$graph$tv[vt, , drop = FALSE], refine = FALSE, extend = FALSE )
Use
fmesher::fm_segm()
instead.
Constructs inla.mesh.segment
objects that can be used to specify
boundary and interior constraint edges in calls to inla.mesh()
.
inla.mesh.segment(...) inla.contour.segment(...)
inla.mesh.segment(...) inla.contour.segment(...)
... |
Parameters passed on to |
An fm_segm
object.
inla.contour.segment()
: Use
fmesher::fm_segm_contour_helper()
instead.
Finn Lindgren finn.lindgren@gmail.com
inla.mesh.create()
, inla.mesh.2d()
require("fmesher") ## Create a square boundary and a diagonal interior segment loc.bnd <- matrix(c(0, 0, 1, 0, 1, 1, 0, 1), 4, 2, byrow = TRUE) loc.int <- matrix(c(0.9, 0.1, 0.1, 0.6), 2, 2, byrow = TRUE) segm.bnd <- fm_segm(loc.bnd) segm.int <- fm_segm(loc.int, is.bnd = FALSE) ## Points to be meshed loc <- matrix(runif(10 * 2), 10, 2) * 0.9 + 0.05 mesh <- fm_rcdt_2d_inla(loc, boundary = segm.bnd, interior = segm.int, refine = list() ) plot(mesh) mesh <- fm_rcdt_2d_inla(loc, interior = fm_segm_join(segm.bnd, segm.int)) plot(mesh)
require("fmesher") ## Create a square boundary and a diagonal interior segment loc.bnd <- matrix(c(0, 0, 1, 0, 1, 1, 0, 1), 4, 2, byrow = TRUE) loc.int <- matrix(c(0.9, 0.1, 0.1, 0.6), 2, 2, byrow = TRUE) segm.bnd <- fm_segm(loc.bnd) segm.int <- fm_segm(loc.int, is.bnd = FALSE) ## Points to be meshed loc <- matrix(runif(10 * 2), 10, 2) * 0.9 + 0.05 mesh <- fm_rcdt_2d_inla(loc, boundary = segm.bnd, interior = segm.int, refine = list() ) plot(mesh) mesh <- fm_rcdt_2d_inla(loc, interior = fm_segm_join(segm.bnd, segm.int)) plot(mesh)
This page describe the models implemented in inla
, divided into sections:
latent, group, scopy, mix, link, predictor, hazard, likelihood, prior, wrapper, lp.scale.
inla.models()
inla.models()
Valid sections are: latent, group, scopy, mix, link, predictor, hazard, likelihood, prior, wrapper, lp.scale.
Valid models in this section are:
Alternative interface to an fixed effect
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
linear
Number of hyperparmeters is 0.
Gaussian random effects in dim=1
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
indep
Number of hyperparmeters is 1.
1001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
Classical measurement error model
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
mec
Number of hyperparmeters is 4.
2001
beta
b
gaussian
1 0.001
1
FALSE
function(x) x
function(x) x
2002
prec.u
prec
loggamma
1 1e-04
9.21034037197618
TRUE
function(x) log(x)
function(x) exp(x)
2003
mean.x
mu.x
gaussian
0 1e-04
0
TRUE
function(x) x
function(x) x
2004
prec.x
prec.x
loggamma
1 10000
-9.21034037197618
TRUE
function(x) log(x)
function(x) exp(x)
Berkson measurement error model
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
meb
Number of hyperparmeters is 2.
3001
beta
b
gaussian
1 0.001
1
FALSE
function(x) x
function(x) x
3002
prec.u
prec
loggamma
1 1e-04
6.90775527898214
FALSE
function(x) log(x)
function(x) exp(x)
Generic latent model specified using R
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
rgeneric
Number of hyperparmeters is 0.
Generic latent model specified using C
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
rgeneric
Number of hyperparmeters is 0.
Random walk of order 1
TRUE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
1e-06
rw1
Number of hyperparmeters is 1.
4001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
Random walk of order 2
TRUE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
1e-04
rw2
Number of hyperparmeters is 1.
5001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
Exact solution to the random walk of order 2
TRUE
FALSE
FALSE
2
1
NULL
FALSE
FALSE
1e-04
crw2
Number of hyperparmeters is 1.
6001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
Seasonal model for time series
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
seasonal
Number of hyperparmeters is 1.
7001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
The Besag area model (CAR-model)
TRUE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
besag
Number of hyperparmeters is 1.
8001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
The shared Besag model
TRUE
FALSE
FALSE
1
1 2
2
TRUE
TRUE
besag2
Number of hyperparmeters is 2.
9001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
9002
scaling parameter
a
loggamma
10 10
0
FALSE
function(x) log(x)
function(x) exp(x)
The BYM-model (Besag-York-Mollier model)
TRUE
FALSE
TRUE
2
2
NULL
TRUE
TRUE
bym
Number of hyperparmeters is 2.
10001
log unstructured precision
prec.unstruct
loggamma
1 5e-04
4
FALSE
function(x) log(x)
function(x) exp(x)
10002
log spatial precision
prec.spatial
loggamma
1 5e-04
4
FALSE
function(x) log(x)
function(x) exp(x)
The BYM-model with the PC priors
TRUE
FALSE
TRUE
2
2
NULL
TRUE
TRUE
bym2
Number of hyperparmeters is 2.
11001
log precision
prec
pc.prec
1 0.01
4
FALSE
function(x) log(x)
function(x) exp(x)
11002
logit phi
phi
pc
0.5 0.5
-3
FALSE
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
A proper version of the Besag model
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
besagproper
Number of hyperparmeters is 2.
12001
log precision
prec
loggamma
1 5e-04
2
FALSE
function(x) log(x)
function(x) exp(x)
12002
log diagonal
diag
loggamma
1 1
1
FALSE
function(x) log(x)
function(x) exp(x)
An alternative proper version of the Besag model
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
besagproper2
Number of hyperparmeters is 2.
13001
log precision
prec
loggamma
1 5e-04
2
FALSE
function(x) log(x)
function(x) exp(x)
13002
logit lambda
lambda
gaussian
0 0.45
3
FALSE
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Fractional Gaussian noise model
FALSE
FALSE
TRUE
5
1
NULL
FALSE
TRUE
4
3 4
fgn
Number of hyperparmeters is 2.
13101
log precision
prec
pc.prec
3 0.01
1
FALSE
function(x) log(x)
function(x) exp(x)
13102
logit H
H
pcfgnh
0.9 0.1
2
FALSE
function(x) log((2 * x - 1) / (2 * (1 - x)))
function(x) 0.5 + 0.5 * exp(x) / (1 + exp(x))
Fractional Gaussian noise model (alt 2)
FALSE
FALSE
TRUE
4
1
NULL
FALSE
TRUE
4
3 4
fgn
Number of hyperparmeters is 2.
13111
log precision
prec
pc.prec
3 0.01
1
FALSE
function(x) log(x)
function(x) exp(x)
13112
logit H
H
pcfgnh
0.9 0.1
2
FALSE
function(x) log((2 * x - 1) / (2 * (1 - x)))
function(x) 0.5 + 0.5 * exp(x) / (1 + exp(x))
Auto-regressive model of order 1 (AR(1))
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
ar1
Number of hyperparmeters is 3.
14001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
14002
logit lag one correlation
rho
normal
0 0.15
2
FALSE
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
14003
mean
mean
normal
0 1
0
TRUE
function(x) x
function(x) x
Auto-regressive model of order 1 w/covariates
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
TRUE
ar1c
Number of hyperparmeters is 2.
14101
log precision
prec
pc.prec
1 0.01
4
FALSE
function(x) log(x)
function(x) exp(x)
14102
logit lag one correlation
rho
pc.cor0
0.5 0.5
2
FALSE
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
Auto-regressive model of order p (AR(p))
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
ar
Number of hyperparmeters is 11.
15001
log precision
prec
4
FALSE
pc.prec
3 0.01
function(x) log(x)
function(x) exp(x)
15002
pacf1
pacf1
1
FALSE
pc.cor0
0.5 0.5
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15003
pacf2
pacf2
0
FALSE
pc.cor0
0.5 0.4
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15004
pacf3
pacf3
0
FALSE
pc.cor0
0.5 0.3
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15005
pacf4
pacf4
0
FALSE
pc.cor0
0.5 0.2
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15006
pacf5
pacf5
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15007
pacf6
pacf6
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15008
pacf7
pacf7
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15009
pacf8
pacf8
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15010
pacf9
pacf9
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
15011
pacf10
pacf10
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
The Ornstein-Uhlenbeck process
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
ou
Number of hyperparmeters is 2.
16001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
16002
log phi
phi
normal
0 0.2
-1
FALSE
function(x) log(x)
function(x) exp(x)
Intecept-slope model with Wishart-prior
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
TRUE
intslope
Number of hyperparmeters is 53.
16101
log precision1
prec1
4
FALSE
wishart2d
4 1 1 0
function(x) log(x)
function(x) exp(x)
16102
log precision2
prec2
4
FALSE
none
function(x) log(x)
function(x) exp(x)
16103
logit correlation
cor
4
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
16104
gamma1
g1
1
TRUE
normal
1 36
function(x) x
function(x) x
16105
gamma2
g2
1
TRUE
normal
1 36
function(x) x
function(x) x
16106
gamma3
g3
1
TRUE
normal
1 36
function(x) x
function(x) x
16107
gamma4
g4
1
TRUE
normal
1 36
function(x) x
function(x) x
16108
gamma5
g5
1
TRUE
normal
1 36
function(x) x
function(x) x
16109
gamma6
g6
1
TRUE
normal
1 36
function(x) x
function(x) x
16110
gamma7
g7
1
TRUE
normal
1 36
function(x) x
function(x) x
16111
gamma8
g8
1
TRUE
normal
1 36
function(x) x
function(x) x
16112
gamma9
g9
1
TRUE
normal
1 36
function(x) x
function(x) x
16113
gamma10
g10
1
TRUE
normal
1 36
function(x) x
function(x) x
16114
gamma11
g11
1
TRUE
normal
1 36
function(x) x
function(x) x
16115
gamma12
g12
1
TRUE
normal
1 36
function(x) x
function(x) x
16116
gamma13
g13
1
TRUE
normal
1 36
function(x) x
function(x) x
16117
gamma14
g14
1
TRUE
normal
1 36
function(x) x
function(x) x
16118
gamma15
g15
1
TRUE
normal
1 36
function(x) x
function(x) x
16119
gamma16
g16
1
TRUE
normal
1 36
function(x) x
function(x) x
16120
gamma17
g17
1
TRUE
normal
1 36
function(x) x
function(x) x
16121
gamma18
g18
1
TRUE
normal
1 36
function(x) x
function(x) x
16122
gamma19
g19
1
TRUE
normal
1 36
function(x) x
function(x) x
16123
gamma20
g20
1
TRUE
normal
1 36
function(x) x
function(x) x
16124
gamma21
g21
1
TRUE
normal
1 36
function(x) x
function(x) x
16125
gamma22
g22
1
TRUE
normal
1 36
function(x) x
function(x) x
16126
gamma23
g23
1
TRUE
normal
1 36
function(x) x
function(x) x
16127
gamma24
g24
1
TRUE
normal
1 36
function(x) x
function(x) x
16128
gamma25
g25
1
TRUE
normal
1 36
function(x) x
function(x) x
16129
gamma26
g26
1
TRUE
normal
1 36
function(x) x
function(x) x
16130
gamma27
g27
1
TRUE
normal
1 36
function(x) x
function(x) x
16131
gamma28
g28
1
TRUE
normal
1 36
function(x) x
function(x) x
16132
gamma29
g29
1
TRUE
normal
1 36
function(x) x
function(x) x
16133
gamma30
g30
1
TRUE
normal
1 36
function(x) x
function(x) x
16134
gamma31
g31
1
TRUE
normal
1 36
function(x) x
function(x) x
16135
gamma32
g32
1
TRUE
normal
1 36
function(x) x
function(x) x
16136
gamma33
g33
1
TRUE
normal
1 36
function(x) x
function(x) x
16137
gamma34
g34
1
TRUE
normal
1 36
function(x) x
function(x) x
16138
gamma35
g35
1
TRUE
normal
1 36
function(x) x
function(x) x
16139
gamma36
g36
1
TRUE
normal
1 36
function(x) x
function(x) x
16140
gamma37
g37
1
TRUE
normal
1 36
function(x) x
function(x) x
16141
gamma38
g38
1
TRUE
normal
1 36
function(x) x
function(x) x
16142
gamma39
g39
1
TRUE
normal
1 36
function(x) x
function(x) x
16143
gamma40
g40
1
TRUE
normal
1 36
function(x) x
function(x) x
16144
gamma41
g41
1
TRUE
normal
1 36
function(x) x
function(x) x
16145
gamma42
g42
1
TRUE
normal
1 36
function(x) x
function(x) x
16146
gamma43
g43
1
TRUE
normal
1 36
function(x) x
function(x) x
16147
gamma44
g44
1
TRUE
normal
1 36
function(x) x
function(x) x
16148
gamma45
g45
1
TRUE
normal
1 36
function(x) x
function(x) x
16149
gamma46
g46
1
TRUE
normal
1 36
function(x) x
function(x) x
16150
gamma47
g47
1
TRUE
normal
1 36
function(x) x
function(x) x
16151
gamma48
g48
1
TRUE
normal
1 36
function(x) x
function(x) x
16152
gamma49
g49
1
TRUE
normal
1 36
function(x) x
function(x) x
16153
gamma50
g50
1
TRUE
normal
1 36
function(x) x
function(x) x
A generic model
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
generic0
Number of hyperparmeters is 1.
17001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
A generic model (type 0)
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
generic0
Number of hyperparmeters is 1.
18001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
A generic model (type 1)
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
generic1
Number of hyperparmeters is 2.
19001
log precision
prec
loggamma
1 5e-05
4
FALSE
function(x) log(x)
function(x) exp(x)
19002
beta
beta
2
FALSE
gaussian
0 0.1
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
A generic model (type 2)
FALSE
FALSE
FALSE
2
2
NULL
TRUE
TRUE
generic2
Number of hyperparmeters is 2.
20001
log precision cmatrix
prec
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
20002
log precision random
prec.random
4
FALSE
loggamma
1 0.001
function(x) log(x)
function(x) exp(x)
A generic model (type 3)
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
generic3
Number of hyperparmeters is 11.
21001
log precision1
prec1
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21002
log precision2
prec2
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21003
log precision3
prec3
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21004
log precision4
prec4
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21005
log precision5
prec5
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21006
log precision6
prec6
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21007
log precision7
prec7
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21008
log precision8
prec8
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21009
log precision9
prec9
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21010
log precision10
prec10
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
21011
log precision common
prec.common
0
TRUE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
A SPDE model
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
spde
Number of hyperparmeters is 4.
22001
theta.T
T
2
FALSE
normal
0 1
function(x) x
function(x) x
22002
theta.K
K
-2
FALSE
normal
0 1
function(x) x
function(x) x
22003
theta.KT
KT
0
FALSE
normal
0 1
function(x) x
function(x) x
22004
theta.OC
OC
-20
TRUE
normal
0 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
A SPDE2 model
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
spde2
Number of hyperparmeters is 100.
23001
theta1
t1
0
FALSE
mvnorm
1 1
function(x) x
function(x) x
23002
theta2
t2
0
FALSE
none
function(x) x
function(x) x
23003
theta3
t3
0
FALSE
none
function(x) x
function(x) x
23004
theta4
t4
0
FALSE
none
function(x) x
function(x) x
23005
theta5
t5
0
FALSE
none
function(x) x
function(x) x
23006
theta6
t6
0
FALSE
none
function(x) x
function(x) x
23007
theta7
t7
0
FALSE
none
function(x) x
function(x) x
23008
theta8
t8
0
FALSE
none
function(x) x
function(x) x
23009
theta9
t9
0
FALSE
none
function(x) x
function(x) x
23010
theta10
t10
0
FALSE
none
function(x) x
function(x) x
23011
theta11
t11
0
FALSE
none
function(x) x
function(x) x
23012
theta12
t12
0
FALSE
none
function(x) x
function(x) x
23013
theta13
t13
0
FALSE
none
function(x) x
function(x) x
23014
theta14
t14
0
FALSE
none
function(x) x
function(x) x
23015
theta15
t15
0
FALSE
none
function(x) x
function(x) x
23016
theta16
t16
0
FALSE
none
function(x) x
function(x) x
23017
theta17
t17
0
FALSE
none
function(x) x
function(x) x
23018
theta18
t18
0
FALSE
none
function(x) x
function(x) x
23019
theta19
t19
0
FALSE
none
function(x) x
function(x) x
23020
theta20
t20
0
FALSE
none
function(x) x
function(x) x
23021
theta21
t21
0
FALSE
none
function(x) x
function(x) x
23022
theta22
t22
0
FALSE
none
function(x) x
function(x) x
23023
theta23
t23
0
FALSE
none
function(x) x
function(x) x
23024
theta24
t24
0
FALSE
none
function(x) x
function(x) x
23025
theta25
t25
0
FALSE
none
function(x) x
function(x) x
23026
theta26
t26
0
FALSE
none
function(x) x
function(x) x
23027
theta27
t27
0
FALSE
none
function(x) x
function(x) x
23028
theta28
t28
0
FALSE
none
function(x) x
function(x) x
23029
theta29
t29
0
FALSE
none
function(x) x
function(x) x
23030
theta30
t30
0
FALSE
none
function(x) x
function(x) x
23031
theta31
t31
0
FALSE
none
function(x) x
function(x) x
23032
theta32
t32
0
FALSE
none
function(x) x
function(x) x
23033
theta33
t33
0
FALSE
none
function(x) x
function(x) x
23034
theta34
t34
0
FALSE
none
function(x) x
function(x) x
23035
theta35
t35
0
FALSE
none
function(x) x
function(x) x
23036
theta36
t36
0
FALSE
none
function(x) x
function(x) x
23037
theta37
t37
0
FALSE
none
function(x) x
function(x) x
23038
theta38
t38
0
FALSE
none
function(x) x
function(x) x
23039
theta39
t39
0
FALSE
none
function(x) x
function(x) x
23040
theta40
t40
0
FALSE
none
function(x) x
function(x) x
23041
theta41
t41
0
FALSE
none
function(x) x
function(x) x
23042
theta42
t42
0
FALSE
none
function(x) x
function(x) x
23043
theta43
t43
0
FALSE
none
function(x) x
function(x) x
23044
theta44
t44
0
FALSE
none
function(x) x
function(x) x
23045
theta45
t45
0
FALSE
none
function(x) x
function(x) x
23046
theta46
t46
0
FALSE
none
function(x) x
function(x) x
23047
theta47
t47
0
FALSE
none
function(x) x
function(x) x
23048
theta48
t48
0
FALSE
none
function(x) x
function(x) x
23049
theta49
t49
0
FALSE
none
function(x) x
function(x) x
23050
theta50
t50
0
FALSE
none
function(x) x
function(x) x
23051
theta51
t51
0
FALSE
none
function(x) x
function(x) x
23052
theta52
t52
0
FALSE
none
function(x) x
function(x) x
23053
theta53
t53
0
FALSE
none
function(x) x
function(x) x
23054
theta54
t54
0
FALSE
none
function(x) x
function(x) x
23055
theta55
t55
0
FALSE
none
function(x) x
function(x) x
23056
theta56
t56
0
FALSE
none
function(x) x
function(x) x
23057
theta57
t57
0
FALSE
none
function(x) x
function(x) x
23058
theta58
t58
0
FALSE
none
function(x) x
function(x) x
23059
theta59
t59
0
FALSE
none
function(x) x
function(x) x
23060
theta60
t60
0
FALSE
none
function(x) x
function(x) x
23061
theta61
t61
0
FALSE
none
function(x) x
function(x) x
23062
theta62
t62
0
FALSE
none
function(x) x
function(x) x
23063
theta63
t63
0
FALSE
none
function(x) x
function(x) x
23064
theta64
t64
0
FALSE
none
function(x) x
function(x) x
23065
theta65
t65
0
FALSE
none
function(x) x
function(x) x
23066
theta66
t66
0
FALSE
none
function(x) x
function(x) x
23067
theta67
t67
0
FALSE
none
function(x) x
function(x) x
23068
theta68
t68
0
FALSE
none
function(x) x
function(x) x
23069
theta69
t69
0
FALSE
none
function(x) x
function(x) x
23070
theta70
t70
0
FALSE
none
function(x) x
function(x) x
23071
theta71
t71
0
FALSE
none
function(x) x
function(x) x
23072
theta72
t72
0
FALSE
none
function(x) x
function(x) x
23073
theta73
t73
0
FALSE
none
function(x) x
function(x) x
23074
theta74
t74
0
FALSE
none
function(x) x
function(x) x
23075
theta75
t75
0
FALSE
none
function(x) x
function(x) x
23076
theta76
t76
0
FALSE
none
function(x) x
function(x) x
23077
theta77
t77
0
FALSE
none
function(x) x
function(x) x
23078
theta78
t78
0
FALSE
none
function(x) x
function(x) x
23079
theta79
t79
0
FALSE
none
function(x) x
function(x) x
23080
theta80
t80
0
FALSE
none
function(x) x
function(x) x
23081
theta81
t81
0
FALSE
none
function(x) x
function(x) x
23082
theta82
t82
0
FALSE
none
function(x) x
function(x) x
23083
theta83
t83
0
FALSE
none
function(x) x
function(x) x
23084
theta84
t84
0
FALSE
none
function(x) x
function(x) x
23085
theta85
t85
0
FALSE
none
function(x) x
function(x) x
23086
theta86
t86
0
FALSE
none
function(x) x
function(x) x
23087
theta87
t87
0
FALSE
none
function(x) x
function(x) x
23088
theta88
t88
0
FALSE
none
function(x) x
function(x) x
23089
theta89
t89
0
FALSE
none
function(x) x
function(x) x
23090
theta90
t90
0
FALSE
none
function(x) x
function(x) x
23091
theta91
t91
0
FALSE
none
function(x) x
function(x) x
23092
theta92
t92
0
FALSE
none
function(x) x
function(x) x
23093
theta93
t93
0
FALSE
none
function(x) x
function(x) x
23094
theta94
t94
0
FALSE
none
function(x) x
function(x) x
23095
theta95
t95
0
FALSE
none
function(x) x
function(x) x
23096
theta96
t96
0
FALSE
none
function(x) x
function(x) x
23097
theta97
t97
0
FALSE
none
function(x) x
function(x) x
23098
theta98
t98
0
FALSE
none
function(x) x
function(x) x
23099
theta99
t99
0
FALSE
none
function(x) x
function(x) x
23100
theta100
t100
0
FALSE
none
function(x) x
function(x) x
A SPDE3 model
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
spde3
Number of hyperparmeters is 100.
24001
theta1
t1
0
FALSE
mvnorm
1 1
function(x) x
function(x) x
24002
theta2
t2
0
FALSE
none
function(x) x
function(x) x
24003
theta3
t3
0
FALSE
none
function(x) x
function(x) x
24004
theta4
t4
0
FALSE
none
function(x) x
function(x) x
24005
theta5
t5
0
FALSE
none
function(x) x
function(x) x
24006
theta6
t6
0
FALSE
none
function(x) x
function(x) x
24007
theta7
t7
0
FALSE
none
function(x) x
function(x) x
24008
theta8
t8
0
FALSE
none
function(x) x
function(x) x
24009
theta9
t9
0
FALSE
none
function(x) x
function(x) x
24010
theta10
t10
0
FALSE
none
function(x) x
function(x) x
24011
theta11
t11
0
FALSE
none
function(x) x
function(x) x
24012
theta12
t12
0
FALSE
none
function(x) x
function(x) x
24013
theta13
t13
0
FALSE
none
function(x) x
function(x) x
24014
theta14
t14
0
FALSE
none
function(x) x
function(x) x
24015
theta15
t15
0
FALSE
none
function(x) x
function(x) x
24016
theta16
t16
0
FALSE
none
function(x) x
function(x) x
24017
theta17
t17
0
FALSE
none
function(x) x
function(x) x
24018
theta18
t18
0
FALSE
none
function(x) x
function(x) x
24019
theta19
t19
0
FALSE
none
function(x) x
function(x) x
24020
theta20
t20
0
FALSE
none
function(x) x
function(x) x
24021
theta21
t21
0
FALSE
none
function(x) x
function(x) x
24022
theta22
t22
0
FALSE
none
function(x) x
function(x) x
24023
theta23
t23
0
FALSE
none
function(x) x
function(x) x
24024
theta24
t24
0
FALSE
none
function(x) x
function(x) x
24025
theta25
t25
0
FALSE
none
function(x) x
function(x) x
24026
theta26
t26
0
FALSE
none
function(x) x
function(x) x
24027
theta27
t27
0
FALSE
none
function(x) x
function(x) x
24028
theta28
t28
0
FALSE
none
function(x) x
function(x) x
24029
theta29
t29
0
FALSE
none
function(x) x
function(x) x
24030
theta30
t30
0
FALSE
none
function(x) x
function(x) x
24031
theta31
t31
0
FALSE
none
function(x) x
function(x) x
24032
theta32
t32
0
FALSE
none
function(x) x
function(x) x
24033
theta33
t33
0
FALSE
none
function(x) x
function(x) x
24034
theta34
t34
0
FALSE
none
function(x) x
function(x) x
24035
theta35
t35
0
FALSE
none
function(x) x
function(x) x
24036
theta36
t36
0
FALSE
none
function(x) x
function(x) x
24037
theta37
t37
0
FALSE
none
function(x) x
function(x) x
24038
theta38
t38
0
FALSE
none
function(x) x
function(x) x
24039
theta39
t39
0
FALSE
none
function(x) x
function(x) x
24040
theta40
t40
0
FALSE
none
function(x) x
function(x) x
24041
theta41
t41
0
FALSE
none
function(x) x
function(x) x
24042
theta42
t42
0
FALSE
none
function(x) x
function(x) x
24043
theta43
t43
0
FALSE
none
function(x) x
function(x) x
24044
theta44
t44
0
FALSE
none
function(x) x
function(x) x
24045
theta45
t45
0
FALSE
none
function(x) x
function(x) x
24046
theta46
t46
0
FALSE
none
function(x) x
function(x) x
24047
theta47
t47
0
FALSE
none
function(x) x
function(x) x
24048
theta48
t48
0
FALSE
none
function(x) x
function(x) x
24049
theta49
t49
0
FALSE
none
function(x) x
function(x) x
24050
theta50
t50
0
FALSE
none
function(x) x
function(x) x
24051
theta51
t51
0
FALSE
none
function(x) x
function(x) x
24052
theta52
t52
0
FALSE
none
function(x) x
function(x) x
24053
theta53
t53
0
FALSE
none
function(x) x
function(x) x
24054
theta54
t54
0
FALSE
none
function(x) x
function(x) x
24055
theta55
t55
0
FALSE
none
function(x) x
function(x) x
24056
theta56
t56
0
FALSE
none
function(x) x
function(x) x
24057
theta57
t57
0
FALSE
none
function(x) x
function(x) x
24058
theta58
t58
0
FALSE
none
function(x) x
function(x) x
24059
theta59
t59
0
FALSE
none
function(x) x
function(x) x
24060
theta60
t60
0
FALSE
none
function(x) x
function(x) x
24061
theta61
t61
0
FALSE
none
function(x) x
function(x) x
24062
theta62
t62
0
FALSE
none
function(x) x
function(x) x
24063
theta63
t63
0
FALSE
none
function(x) x
function(x) x
24064
theta64
t64
0
FALSE
none
function(x) x
function(x) x
24065
theta65
t65
0
FALSE
none
function(x) x
function(x) x
24066
theta66
t66
0
FALSE
none
function(x) x
function(x) x
24067
theta67
t67
0
FALSE
none
function(x) x
function(x) x
24068
theta68
t68
0
FALSE
none
function(x) x
function(x) x
24069
theta69
t69
0
FALSE
none
function(x) x
function(x) x
24070
theta70
t70
0
FALSE
none
function(x) x
function(x) x
24071
theta71
t71
0
FALSE
none
function(x) x
function(x) x
24072
theta72
t72
0
FALSE
none
function(x) x
function(x) x
24073
theta73
t73
0
FALSE
none
function(x) x
function(x) x
24074
theta74
t74
0
FALSE
none
function(x) x
function(x) x
24075
theta75
t75
0
FALSE
none
function(x) x
function(x) x
24076
theta76
t76
0
FALSE
none
function(x) x
function(x) x
24077
theta77
t77
0
FALSE
none
function(x) x
function(x) x
24078
theta78
t78
0
FALSE
none
function(x) x
function(x) x
24079
theta79
t79
0
FALSE
none
function(x) x
function(x) x
24080
theta80
t80
0
FALSE
none
function(x) x
function(x) x
24081
theta81
t81
0
FALSE
none
function(x) x
function(x) x
24082
theta82
t82
0
FALSE
none
function(x) x
function(x) x
24083
theta83
t83
0
FALSE
none
function(x) x
function(x) x
24084
theta84
t84
0
FALSE
none
function(x) x
function(x) x
24085
theta85
t85
0
FALSE
none
function(x) x
function(x) x
24086
theta86
t86
0
FALSE
none
function(x) x
function(x) x
24087
theta87
t87
0
FALSE
none
function(x) x
function(x) x
24088
theta88
t88
0
FALSE
none
function(x) x
function(x) x
24089
theta89
t89
0
FALSE
none
function(x) x
function(x) x
24090
theta90
t90
0
FALSE
none
function(x) x
function(x) x
24091
theta91
t91
0
FALSE
none
function(x) x
function(x) x
24092
theta92
t92
0
FALSE
none
function(x) x
function(x) x
24093
theta93
t93
0
FALSE
none
function(x) x
function(x) x
24094
theta94
t94
0
FALSE
none
function(x) x
function(x) x
24095
theta95
t95
0
FALSE
none
function(x) x
function(x) x
24096
theta96
t96
0
FALSE
none
function(x) x
function(x) x
24097
theta97
t97
0
FALSE
none
function(x) x
function(x) x
24098
theta98
t98
0
FALSE
none
function(x) x
function(x) x
24099
theta99
t99
0
FALSE
none
function(x) x
function(x) x
24100
theta100
t100
0
FALSE
none
function(x) x
function(x) x
Gaussian random effect in dim=1 with Wishart prior
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
TRUE
iid123d
Number of hyperparmeters is 1.
25001
precision
prec
4
FALSE
wishart1d
2 1e-04
function(x) log(x)
function(x) exp(x)
Gaussian random effect in dim=2 with Wishart prior
FALSE
FALSE
TRUE
1
1 2
2
TRUE
TRUE
iid123d
Number of hyperparmeters is 3.
26001
log precision1
prec1
4
FALSE
wishart2d
4 1 1 0
function(x) log(x)
function(x) exp(x)
26002
log precision2
prec2
4
FALSE
none
function(x) log(x)
function(x) exp(x)
26003
logit correlation
cor
4
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
Gaussian random effect in dim=3 with Wishart prior
FALSE
FALSE
TRUE
1
1 2 3
3
TRUE
TRUE
iid123d
Number of hyperparmeters is 6.
27001
log precision1
prec1
4
FALSE
wishart3d
7 1 1 1 0 0 0
function(x) log(x)
function(x) exp(x)
27002
log precision2
prec2
4
FALSE
none
function(x) log(x)
function(x) exp(x)
27003
log precision3
prec3
4
FALSE
none
function(x) log(x)
function(x) exp(x)
27004
logit correlation12
cor12
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
27005
logit correlation13
cor13
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
27006
logit correlation23
cor23
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
Gaussian random effect in dim=4 with Wishart prior
FALSE
FALSE
TRUE
1
1 2 3 4
4
TRUE
TRUE
iid123d
Number of hyperparmeters is 10.
28001
log precision1
prec1
4
FALSE
wishart4d
11 1 1 1 1 0 0 0 0 0 0
function(x) log(x)
function(x) exp(x)
28002
log precision2
prec2
4
FALSE
none
function(x) log(x)
function(x) exp(x)
28003
log precision3
prec3
4
FALSE
none
function(x) log(x)
function(x) exp(x)
28004
log precision4
prec4
4
FALSE
none
function(x) log(x)
function(x) exp(x)
28005
logit correlation12
cor12
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
28006
logit correlation13
cor13
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
28007
logit correlation14
cor14
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
28008
logit correlation23
cor23
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
28009
logit correlation24
cor24
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
28010
logit correlation34
cor34
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
Gaussian random effect in dim=5 with Wishart prior
FALSE
FALSE
TRUE
1
1 2 3 4 5
5
TRUE
TRUE
iid123d
Number of hyperparmeters is 15.
29001
log precision1
prec1
4
FALSE
wishart5d
16 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
function(x) log(x)
function(x) exp(x)
29002
log precision2
prec2
4
FALSE
none
function(x) log(x)
function(x) exp(x)
29003
log precision3
prec3
4
FALSE
none
function(x) log(x)
function(x) exp(x)
29004
log precision4
prec4
4
FALSE
none
function(x) log(x)
function(x) exp(x)
29005
log precision5
prec5
4
FALSE
none
function(x) log(x)
function(x) exp(x)
29006
logit correlation12
cor12
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29007
logit correlation13
cor13
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29008
logit correlation14
cor14
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29009
logit correlation15
cor15
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29010
logit correlation23
cor23
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29011
logit correlation24
cor24
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29012
logit correlation25
cor25
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29013
logit correlation34
cor34
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29014
logit correlation35
cor35
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
29015
logit correlation45
cor45
0
FALSE
none
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
Gaussian random effect in dim=k with Wishart prior
FALSE
FALSE
TRUE
1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
-1
TRUE
TRUE
iidkd
Number of hyperparmeters is 300.
29101
theta1
theta1
1048576
FALSE
wishartkd
30 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576 1048576
function(x) x
function(x) x
29102
theta2
theta2
1048576
FALSE
none
function(x) x
function(x) x
29103
theta3
theta3
1048576
FALSE
none
function(x) x
function(x) x
29104
theta4
theta4
1048576
FALSE
none
function(x) x
function(x) x
29105
theta5
theta5
1048576
FALSE
none
function(x) x
function(x) x
29106
theta6
theta6
1048576
FALSE
none
function(x) x
function(x) x
29107
theta7
theta7
1048576
FALSE
none
function(x) x
function(x) x
29108
theta8
theta8
1048576
FALSE
none
function(x) x
function(x) x
29109
theta9
theta9
1048576
FALSE
none
function(x) x
function(x) x
29110
theta10
theta10
1048576
FALSE
none
function(x) x
function(x) x
29111
theta11
theta11
1048576
FALSE
none
function(x) x
function(x) x
29112
theta12
theta12
1048576
FALSE
none
function(x) x
function(x) x
29113
theta13
theta13
1048576
FALSE
none
function(x) x
function(x) x
29114
theta14
theta14
1048576
FALSE
none
function(x) x
function(x) x
29115
theta15
theta15
1048576
FALSE
none
function(x) x
function(x) x
29116
theta16
theta16
1048576
FALSE
none
function(x) x
function(x) x
29117
theta17
theta17
1048576
FALSE
none
function(x) x
function(x) x
29118
theta18
theta18
1048576
FALSE
none
function(x) x
function(x) x
29119
theta19
theta19
1048576
FALSE
none
function(x) x
function(x) x
29120
theta20
theta20
1048576
FALSE
none
function(x) x
function(x) x
29121
theta21
theta21
1048576
FALSE
none
function(x) x
function(x) x
29122
theta22
theta22
1048576
FALSE
none
function(x) x
function(x) x
29123
theta23
theta23
1048576
FALSE
none
function(x) x
function(x) x
29124
theta24
theta24
1048576
FALSE
none
function(x) x
function(x) x
29125
theta25
theta25
1048576
FALSE
none
function(x) x
function(x) x
29126
theta26
theta26
1048576
FALSE
none
function(x) x
function(x) x
29127
theta27
theta27
1048576
FALSE
none
function(x) x
function(x) x
29128
theta28
theta28
1048576
FALSE
none
function(x) x
function(x) x
29129
theta29
theta29
1048576
FALSE
none
function(x) x
function(x) x
29130
theta30
theta30
1048576
FALSE
none
function(x) x
function(x) x
29131
theta31
theta31
1048576
FALSE
none
function(x) x
function(x) x
29132
theta32
theta32
1048576
FALSE
none
function(x) x
function(x) x
29133
theta33
theta33
1048576
FALSE
none
function(x) x
function(x) x
29134
theta34
theta34
1048576
FALSE
none
function(x) x
function(x) x
29135
theta35
theta35
1048576
FALSE
none
function(x) x
function(x) x
29136
theta36
theta36
1048576
FALSE
none
function(x) x
function(x) x
29137
theta37
theta37
1048576
FALSE
none
function(x) x
function(x) x
29138
theta38
theta38
1048576
FALSE
none
function(x) x
function(x) x
29139
theta39
theta39
1048576
FALSE
none
function(x) x
function(x) x
29140
theta40
theta40
1048576
FALSE
none
function(x) x
function(x) x
29141
theta41
theta41
1048576
FALSE
none
function(x) x
function(x) x
29142
theta42
theta42
1048576
FALSE
none
function(x) x
function(x) x
29143
theta43
theta43
1048576
FALSE
none
function(x) x
function(x) x
29144
theta44
theta44
1048576
FALSE
none
function(x) x
function(x) x
29145
theta45
theta45
1048576
FALSE
none
function(x) x
function(x) x
29146
theta46
theta46
1048576
FALSE
none
function(x) x
function(x) x
29147
theta47
theta47
1048576
FALSE
none
function(x) x
function(x) x
29148
theta48
theta48
1048576
FALSE
none
function(x) x
function(x) x
29149
theta49
theta49
1048576
FALSE
none
function(x) x
function(x) x
29150
theta50
theta50
1048576
FALSE
none
function(x) x
function(x) x
29151
theta51
theta51
1048576
FALSE
none
function(x) x
function(x) x
29152
theta52
theta52
1048576
FALSE
none
function(x) x
function(x) x
29153
theta53
theta53
1048576
FALSE
none
function(x) x
function(x) x
29154
theta54
theta54
1048576
FALSE
none
function(x) x
function(x) x
29155
theta55
theta55
1048576
FALSE
none
function(x) x
function(x) x
29156
theta56
theta56
1048576
FALSE
none
function(x) x
function(x) x
29157
theta57
theta57
1048576
FALSE
none
function(x) x
function(x) x
29158
theta58
theta58
1048576
FALSE
none
function(x) x
function(x) x
29159
theta59
theta59
1048576
FALSE
none
function(x) x
function(x) x
29160
theta60
theta60
1048576
FALSE
none
function(x) x
function(x) x
29161
theta61
theta61
1048576
FALSE
none
function(x) x
function(x) x
29162
theta62
theta62
1048576
FALSE
none
function(x) x
function(x) x
29163
theta63
theta63
1048576
FALSE
none
function(x) x
function(x) x
29164
theta64
theta64
1048576
FALSE
none
function(x) x
function(x) x
29165
theta65
theta65
1048576
FALSE
none
function(x) x
function(x) x
29166
theta66
theta66
1048576
FALSE
none
function(x) x
function(x) x
29167
theta67
theta67
1048576
FALSE
none
function(x) x
function(x) x
29168
theta68
theta68
1048576
FALSE
none
function(x) x
function(x) x
29169
theta69
theta69
1048576
FALSE
none
function(x) x
function(x) x
29170
theta70
theta70
1048576
FALSE
none
function(x) x
function(x) x
29171
theta71
theta71
1048576
FALSE
none
function(x) x
function(x) x
29172
theta72
theta72
1048576
FALSE
none
function(x) x
function(x) x
29173
theta73
theta73
1048576
FALSE
none
function(x) x
function(x) x
29174
theta74
theta74
1048576
FALSE
none
function(x) x
function(x) x
29175
theta75
theta75
1048576
FALSE
none
function(x) x
function(x) x
29176
theta76
theta76
1048576
FALSE
none
function(x) x
function(x) x
29177
theta77
theta77
1048576
FALSE
none
function(x) x
function(x) x
29178
theta78
theta78
1048576
FALSE
none
function(x) x
function(x) x
29179
theta79
theta79
1048576
FALSE
none
function(x) x
function(x) x
29180
theta80
theta80
1048576
FALSE
none
function(x) x
function(x) x
29181
theta81
theta81
1048576
FALSE
none
function(x) x
function(x) x
29182
theta82
theta82
1048576
FALSE
none
function(x) x
function(x) x
29183
theta83
theta83
1048576
FALSE
none
function(x) x
function(x) x
29184
theta84
theta84
1048576
FALSE
none
function(x) x
function(x) x
29185
theta85
theta85
1048576
FALSE
none
function(x) x
function(x) x
29186
theta86
theta86
1048576
FALSE
none
function(x) x
function(x) x
29187
theta87
theta87
1048576
FALSE
none
function(x) x
function(x) x
29188
theta88
theta88
1048576
FALSE
none
function(x) x
function(x) x
29189
theta89
theta89
1048576
FALSE
none
function(x) x
function(x) x
29190
theta90
theta90
1048576
FALSE
none
function(x) x
function(x) x
29191
theta91
theta91
1048576
FALSE
none
function(x) x
function(x) x
29192
theta92
theta92
1048576
FALSE
none
function(x) x
function(x) x
29193
theta93
theta93
1048576
FALSE
none
function(x) x
function(x) x
29194
theta94
theta94
1048576
FALSE
none
function(x) x
function(x) x
29195
theta95
theta95
1048576
FALSE
none
function(x) x
function(x) x
29196
theta96
theta96
1048576
FALSE
none
function(x) x
function(x) x
29197
theta97
theta97
1048576
FALSE
none
function(x) x
function(x) x
29198
theta98
theta98
1048576
FALSE
none
function(x) x
function(x) x
29199
theta99
theta99
1048576
FALSE
none
function(x) x
function(x) x
29200
theta100
theta100
1048576
FALSE
none
function(x) x
function(x) x
29201
theta101
theta101
1048576
FALSE
none
function(x) x
function(x) x
29202
theta102
theta102
1048576
FALSE
none
function(x) x
function(x) x
29203
theta103
theta103
1048576
FALSE
none
function(x) x
function(x) x
29204
theta104
theta104
1048576
FALSE
none
function(x) x
function(x) x
29205
theta105
theta105
1048576
FALSE
none
function(x) x
function(x) x
29206
theta106
theta106
1048576
FALSE
none
function(x) x
function(x) x
29207
theta107
theta107
1048576
FALSE
none
function(x) x
function(x) x
29208
theta108
theta108
1048576
FALSE
none
function(x) x
function(x) x
29209
theta109
theta109
1048576
FALSE
none
function(x) x
function(x) x
29210
theta110
theta110
1048576
FALSE
none
function(x) x
function(x) x
29211
theta111
theta111
1048576
FALSE
none
function(x) x
function(x) x
29212
theta112
theta112
1048576
FALSE
none
function(x) x
function(x) x
29213
theta113
theta113
1048576
FALSE
none
function(x) x
function(x) x
29214
theta114
theta114
1048576
FALSE
none
function(x) x
function(x) x
29215
theta115
theta115
1048576
FALSE
none
function(x) x
function(x) x
29216
theta116
theta116
1048576
FALSE
none
function(x) x
function(x) x
29217
theta117
theta117
1048576
FALSE
none
function(x) x
function(x) x
29218
theta118
theta118
1048576
FALSE
none
function(x) x
function(x) x
29219
theta119
theta119
1048576
FALSE
none
function(x) x
function(x) x
29220
theta120
theta120
1048576
FALSE
none
function(x) x
function(x) x
29221
theta121
theta121
1048576
FALSE
none
function(x) x
function(x) x
29222
theta122
theta122
1048576
FALSE
none
function(x) x
function(x) x
29223
theta123
theta123
1048576
FALSE
none
function(x) x
function(x) x
29224
theta124
theta124
1048576
FALSE
none
function(x) x
function(x) x
29225
theta125
theta125
1048576
FALSE
none
function(x) x
function(x) x
29226
theta126
theta126
1048576
FALSE
none
function(x) x
function(x) x
29227
theta127
theta127
1048576
FALSE
none
function(x) x
function(x) x
29228
theta128
theta128
1048576
FALSE
none
function(x) x
function(x) x
29229
theta129
theta129
1048576
FALSE
none
function(x) x
function(x) x
29230
theta130
theta130
1048576
FALSE
none
function(x) x
function(x) x
29231
theta131
theta131
1048576
FALSE
none
function(x) x
function(x) x
29232
theta132
theta132
1048576
FALSE
none
function(x) x
function(x) x
29233
theta133
theta133
1048576
FALSE
none
function(x) x
function(x) x
29234
theta134
theta134
1048576
FALSE
none
function(x) x
function(x) x
29235
theta135
theta135
1048576
FALSE
none
function(x) x
function(x) x
29236
theta136
theta136
1048576
FALSE
none
function(x) x
function(x) x
29237
theta137
theta137
1048576
FALSE
none
function(x) x
function(x) x
29238
theta138
theta138
1048576
FALSE
none
function(x) x
function(x) x
29239
theta139
theta139
1048576
FALSE
none
function(x) x
function(x) x
29240
theta140
theta140
1048576
FALSE
none
function(x) x
function(x) x
29241
theta141
theta141
1048576
FALSE
none
function(x) x
function(x) x
29242
theta142
theta142
1048576
FALSE
none
function(x) x
function(x) x
29243
theta143
theta143
1048576
FALSE
none
function(x) x
function(x) x
29244
theta144
theta144
1048576
FALSE
none
function(x) x
function(x) x
29245
theta145
theta145
1048576
FALSE
none
function(x) x
function(x) x
29246
theta146
theta146
1048576
FALSE
none
function(x) x
function(x) x
29247
theta147
theta147
1048576
FALSE
none
function(x) x
function(x) x
29248
theta148
theta148
1048576
FALSE
none
function(x) x
function(x) x
29249
theta149
theta149
1048576
FALSE
none
function(x) x
function(x) x
29250
theta150
theta150
1048576
FALSE
none
function(x) x
function(x) x
29251
theta151
theta151
1048576
FALSE
none
function(x) x
function(x) x
29252
theta152
theta152
1048576
FALSE
none
function(x) x
function(x) x
29253
theta153
theta153
1048576
FALSE
none
function(x) x
function(x) x
29254
theta154
theta154
1048576
FALSE
none
function(x) x
function(x) x
29255
theta155
theta155
1048576
FALSE
none
function(x) x
function(x) x
29256
theta156
theta156
1048576
FALSE
none
function(x) x
function(x) x
29257
theta157
theta157
1048576
FALSE
none
function(x) x
function(x) x
29258
theta158
theta158
1048576
FALSE
none
function(x) x
function(x) x
29259
theta159
theta159
1048576
FALSE
none
function(x) x
function(x) x
29260
theta160
theta160
1048576
FALSE
none
function(x) x
function(x) x
29261
theta161
theta161
1048576
FALSE
none
function(x) x
function(x) x
29262
theta162
theta162
1048576
FALSE
none
function(x) x
function(x) x
29263
theta163
theta163
1048576
FALSE
none
function(x) x
function(x) x
29264
theta164
theta164
1048576
FALSE
none
function(x) x
function(x) x
29265
theta165
theta165
1048576
FALSE
none
function(x) x
function(x) x
29266
theta166
theta166
1048576
FALSE
none
function(x) x
function(x) x
29267
theta167
theta167
1048576
FALSE
none
function(x) x
function(x) x
29268
theta168
theta168
1048576
FALSE
none
function(x) x
function(x) x
29269
theta169
theta169
1048576
FALSE
none
function(x) x
function(x) x
29270
theta170
theta170
1048576
FALSE
none
function(x) x
function(x) x
29271
theta171
theta171
1048576
FALSE
none
function(x) x
function(x) x
29272
theta172
theta172
1048576
FALSE
none
function(x) x
function(x) x
29273
theta173
theta173
1048576
FALSE
none
function(x) x
function(x) x
29274
theta174
theta174
1048576
FALSE
none
function(x) x
function(x) x
29275
theta175
theta175
1048576
FALSE
none
function(x) x
function(x) x
29276
theta176
theta176
1048576
FALSE
none
function(x) x
function(x) x
29277
theta177
theta177
1048576
FALSE
none
function(x) x
function(x) x
29278
theta178
theta178
1048576
FALSE
none
function(x) x
function(x) x
29279
theta179
theta179
1048576
FALSE
none
function(x) x
function(x) x
29280
theta180
theta180
1048576
FALSE
none
function(x) x
function(x) x
29281
theta181
theta181
1048576
FALSE
none
function(x) x
function(x) x
29282
theta182
theta182
1048576
FALSE
none
function(x) x
function(x) x
29283
theta183
theta183
1048576
FALSE
none
function(x) x
function(x) x
29284
theta184
theta184
1048576
FALSE
none
function(x) x
function(x) x
29285
theta185
theta185
1048576
FALSE
none
function(x) x
function(x) x
29286
theta186
theta186
1048576
FALSE
none
function(x) x
function(x) x
29287
theta187
theta187
1048576
FALSE
none
function(x) x
function(x) x
29288
theta188
theta188
1048576
FALSE
none
function(x) x
function(x) x
29289
theta189
theta189
1048576
FALSE
none
function(x) x
function(x) x
29290
theta190
theta190
1048576
FALSE
none
function(x) x
function(x) x
29291
theta191
theta191
1048576
FALSE
none
function(x) x
function(x) x
29292
theta192
theta192
1048576
FALSE
none
function(x) x
function(x) x
29293
theta193
theta193
1048576
FALSE
none
function(x) x
function(x) x
29294
theta194
theta194
1048576
FALSE
none
function(x) x
function(x) x
29295
theta195
theta195
1048576
FALSE
none
function(x) x
function(x) x
29296
theta196
theta196
1048576
FALSE
none
function(x) x
function(x) x
29297
theta197
theta197
1048576
FALSE
none
function(x) x
function(x) x
29298
theta198
theta198
1048576
FALSE
none
function(x) x
function(x) x
29299
theta199
theta199
1048576
FALSE
none
function(x) x
function(x) x
29300
theta200
theta200
1048576
FALSE
none
function(x) x
function(x) x
29301
theta201
theta201
1048576
FALSE
none
function(x) x
function(x) x
29302
theta202
theta202
1048576
FALSE
none
function(x) x
function(x) x
29303
theta203
theta203
1048576
FALSE
none
function(x) x
function(x) x
29304
theta204
theta204
1048576
FALSE
none
function(x) x
function(x) x
29305
theta205
theta205
1048576
FALSE
none
function(x) x
function(x) x
29306
theta206
theta206
1048576
FALSE
none
function(x) x
function(x) x
29307
theta207
theta207
1048576
FALSE
none
function(x) x
function(x) x
29308
theta208
theta208
1048576
FALSE
none
function(x) x
function(x) x
29309
theta209
theta209
1048576
FALSE
none
function(x) x
function(x) x
29310
theta210
theta210
1048576
FALSE
none
function(x) x
function(x) x
29311
theta211
theta211
1048576
FALSE
none
function(x) x
function(x) x
29312
theta212
theta212
1048576
FALSE
none
function(x) x
function(x) x
29313
theta213
theta213
1048576
FALSE
none
function(x) x
function(x) x
29314
theta214
theta214
1048576
FALSE
none
function(x) x
function(x) x
29315
theta215
theta215
1048576
FALSE
none
function(x) x
function(x) x
29316
theta216
theta216
1048576
FALSE
none
function(x) x
function(x) x
29317
theta217
theta217
1048576
FALSE
none
function(x) x
function(x) x
29318
theta218
theta218
1048576
FALSE
none
function(x) x
function(x) x
29319
theta219
theta219
1048576
FALSE
none
function(x) x
function(x) x
29320
theta220
theta220
1048576
FALSE
none
function(x) x
function(x) x
29321
theta221
theta221
1048576
FALSE
none
function(x) x
function(x) x
29322
theta222
theta222
1048576
FALSE
none
function(x) x
function(x) x
29323
theta223
theta223
1048576
FALSE
none
function(x) x
function(x) x
29324
theta224
theta224
1048576
FALSE
none
function(x) x
function(x) x
29325
theta225
theta225
1048576
FALSE
none
function(x) x
function(x) x
29326
theta226
theta226
1048576
FALSE
none
function(x) x
function(x) x
29327
theta227
theta227
1048576
FALSE
none
function(x) x
function(x) x
29328
theta228
theta228
1048576
FALSE
none
function(x) x
function(x) x
29329
theta229
theta229
1048576
FALSE
none
function(x) x
function(x) x
29330
theta230
theta230
1048576
FALSE
none
function(x) x
function(x) x
29331
theta231
theta231
1048576
FALSE
none
function(x) x
function(x) x
29332
theta232
theta232
1048576
FALSE
none
function(x) x
function(x) x
29333
theta233
theta233
1048576
FALSE
none
function(x) x
function(x) x
29334
theta234
theta234
1048576
FALSE
none
function(x) x
function(x) x
29335
theta235
theta235
1048576
FALSE
none
function(x) x
function(x) x
29336
theta236
theta236
1048576
FALSE
none
function(x) x
function(x) x
29337
theta237
theta237
1048576
FALSE
none
function(x) x
function(x) x
29338
theta238
theta238
1048576
FALSE
none
function(x) x
function(x) x
29339
theta239
theta239
1048576
FALSE
none
function(x) x
function(x) x
29340
theta240
theta240
1048576
FALSE
none
function(x) x
function(x) x
29341
theta241
theta241
1048576
FALSE
none
function(x) x
function(x) x
29342
theta242
theta242
1048576
FALSE
none
function(x) x
function(x) x
29343
theta243
theta243
1048576
FALSE
none
function(x) x
function(x) x
29344
theta244
theta244
1048576
FALSE
none
function(x) x
function(x) x
29345
theta245
theta245
1048576
FALSE
none
function(x) x
function(x) x
29346
theta246
theta246
1048576
FALSE
none
function(x) x
function(x) x
29347
theta247
theta247
1048576
FALSE
none
function(x) x
function(x) x
29348
theta248
theta248
1048576
FALSE
none
function(x) x
function(x) x
29349
theta249
theta249
1048576
FALSE
none
function(x) x
function(x) x
29350
theta250
theta250
1048576
FALSE
none
function(x) x
function(x) x
29351
theta251
theta251
1048576
FALSE
none
function(x) x
function(x) x
29352
theta252
theta252
1048576
FALSE
none
function(x) x
function(x) x
29353
theta253
theta253
1048576
FALSE
none
function(x) x
function(x) x
29354
theta254
theta254
1048576
FALSE
none
function(x) x
function(x) x
29355
theta255
theta255
1048576
FALSE
none
function(x) x
function(x) x
29356
theta256
theta256
1048576
FALSE
none
function(x) x
function(x) x
29357
theta257
theta257
1048576
FALSE
none
function(x) x
function(x) x
29358
theta258
theta258
1048576
FALSE
none
function(x) x
function(x) x
29359
theta259
theta259
1048576
FALSE
none
function(x) x
function(x) x
29360
theta260
theta260
1048576
FALSE
none
function(x) x
function(x) x
29361
theta261
theta261
1048576
FALSE
none
function(x) x
function(x) x
29362
theta262
theta262
1048576
FALSE
none
function(x) x
function(x) x
29363
theta263
theta263
1048576
FALSE
none
function(x) x
function(x) x
29364
theta264
theta264
1048576
FALSE
none
function(x) x
function(x) x
29365
theta265
theta265
1048576
FALSE
none
function(x) x
function(x) x
29366
theta266
theta266
1048576
FALSE
none
function(x) x
function(x) x
29367
theta267
theta267
1048576
FALSE
none
function(x) x
function(x) x
29368
theta268
theta268
1048576
FALSE
none
function(x) x
function(x) x
29369
theta269
theta269
1048576
FALSE
none
function(x) x
function(x) x
29370
theta270
theta270
1048576
FALSE
none
function(x) x
function(x) x
29371
theta271
theta271
1048576
FALSE
none
function(x) x
function(x) x
29372
theta272
theta272
1048576
FALSE
none
function(x) x
function(x) x
29373
theta273
theta273
1048576
FALSE
none
function(x) x
function(x) x
29374
theta274
theta274
1048576
FALSE
none
function(x) x
function(x) x
29375
theta275
theta275
1048576
FALSE
none
function(x) x
function(x) x
29376
theta276
theta276
1048576
FALSE
none
function(x) x
function(x) x
29377
theta277
theta277
1048576
FALSE
none
function(x) x
function(x) x
29378
theta278
theta278
1048576
FALSE
none
function(x) x
function(x) x
29379
theta279
theta279
1048576
FALSE
none
function(x) x
function(x) x
29380
theta280
theta280
1048576
FALSE
none
function(x) x
function(x) x
29381
theta281
theta281
1048576
FALSE
none
function(x) x
function(x) x
29382
theta282
theta282
1048576
FALSE
none
function(x) x
function(x) x
29383
theta283
theta283
1048576
FALSE
none
function(x) x
function(x) x
29384
theta284
theta284
1048576
FALSE
none
function(x) x
function(x) x
29385
theta285
theta285
1048576
FALSE
none
function(x) x
function(x) x
29386
theta286
theta286
1048576
FALSE
none
function(x) x
function(x) x
29387
theta287
theta287
1048576
FALSE
none
function(x) x
function(x) x
29388
theta288
theta288
1048576
FALSE
none
function(x) x
function(x) x
29389
theta289
theta289
1048576
FALSE
none
function(x) x
function(x) x
29390
theta290
theta290
1048576
FALSE
none
function(x) x
function(x) x
29391
theta291
theta291
1048576
FALSE
none
function(x) x
function(x) x
29392
theta292
theta292
1048576
FALSE
none
function(x) x
function(x) x
29393
theta293
theta293
1048576
FALSE
none
function(x) x
function(x) x
29394
theta294
theta294
1048576
FALSE
none
function(x) x
function(x) x
29395
theta295
theta295
1048576
FALSE
none
function(x) x
function(x) x
29396
theta296
theta296
1048576
FALSE
none
function(x) x
function(x) x
29397
theta297
theta297
1048576
FALSE
none
function(x) x
function(x) x
29398
theta298
theta298
1048576
FALSE
none
function(x) x
function(x) x
29399
theta299
theta299
1048576
FALSE
none
function(x) x
function(x) x
29400
theta300
theta300
1048576
FALSE
none
function(x) x
function(x) x
(This model is obsolute)
FALSE
FALSE
FALSE
1
1 2
2
TRUE
TRUE
iid123d
Number of hyperparmeters is 3.
30001
log precision1
prec1
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
30002
log precision2
prec2
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
30003
correlation
cor
4
FALSE
normal
0 0.15
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
The z-model in a classical mixed model formulation
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
z
Number of hyperparmeters is 1.
31001
log precision
prec
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
Thin-plate spline model
TRUE
TRUE
FALSE
1
NULL
NULL
FALSE
TRUE
rw2d
Number of hyperparmeters is 1.
32001
log precision
prec
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
Thin-plate spline with iid noise
TRUE
TRUE
TRUE
2
2
NULL
FALSE
TRUE
rw2diid
Number of hyperparmeters is 2.
33001
log precision
prec
pc.prec
1 0.01
4
FALSE
function(x) log(x)
function(x) exp(x)
33002
logit phi
phi
pc
0.5 0.5
3
FALSE
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Spatial lag model
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
slm
Number of hyperparmeters is 2.
34001
log precision
prec
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
34002
rho
rho
0
FALSE
normal
0 10
function(x) log(x / (1 - x))
function(x) 1 / (1 + exp(-x))
Matern covariance function on a regular grid
FALSE
TRUE
FALSE
1
NULL
NULL
FALSE
TRUE
matern2d
Number of hyperparmeters is 2.
35001
log precision
prec
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
35002
log range
range
2
FALSE
loggamma
1 0.01
function(x) log(x)
function(x) exp(x)
Dense Matern field
FALSE
FALSE
FALSE
1
NULL
NULL
TRUE
TRUE
dmatern
Number of hyperparmeters is 3.
35101
log precision
prec
3
FALSE
pc.prec
1 0.01
function(x) log(x)
function(x) exp(x)
35102
log range
range
0
FALSE
pc.range
1 0.5
function(x) log(x)
function(x) exp(x)
35103
log nu
nu
-0.693147180559945
TRUE
loggamma
0.5 1
function(x) log(x)
function(x) exp(x)
Create a copy of a model component
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
copy
Number of hyperparmeters is 1.
36001
beta
b
0
TRUE
normal
1 10
function(x, REPLACE.ME.low, REPLACE.ME.high) { if (all(is.infinite(c(low, high))) || low == high) { return(x) } else if (all(is.finite(c(low, high)))) { stopifnot(low < high) return(log(-(low - x) / (high - x))) } else if (is.finite(low) && is.infinite(high) && high > low) { return(log(x - low)) } else { stop("Condition not yet implemented") } }
function(x, REPLACE.ME.low, REPLACE.ME.high) { if (all(is.infinite(c(low, high))) || low == high) { return(x) } else if (all(is.finite(c(low, high)))) { stopifnot(low < high) return(low + exp(x) / (1 + exp(x)) * (high - low)) } else if (is.finite(low) && is.infinite(high) && high > low) { return(low + exp(x)) } else { stop("Condition not yet implemented") } }
Create a scopy of a model component
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
scopy
Number of hyperparmeters is 15.
36101
mean
mean
1
FALSE
normal
1 10
function(x) x
function(x) x
36102
slope
slope
0
FALSE
normal
0 10
function(x) x
function(x) x
36103
spline.theta1
spline
0
FALSE
laplace
0 10
function(x) x
function(x) x
36104
spline.theta2
spline2
0
FALSE
none
function(x) x
function(x) x
36105
spline.theta3
spline3
0
FALSE
none
function(x) x
function(x) x
36106
spline.theta4
spline4
0
FALSE
none
function(x) x
function(x) x
36107
spline.theta5
spline5
0
FALSE
none
function(x) x
function(x) x
36108
spline.theta6
spline6
0
FALSE
none
function(x) x
function(x) x
36109
spline.theta7
spline7
0
FALSE
none
function(x) x
function(x) x
36110
spline.theta8
spline8
0
FALSE
none
function(x) x
function(x) x
36111
spline.theta9
spline9
0
FALSE
none
function(x) x
function(x) x
36112
spline.theta10
spline10
0
FALSE
none
function(x) x
function(x) x
36113
spline.theta11
spline11
0
FALSE
none
function(x) x
function(x) x
36114
spline.theta12
spline12
0
FALSE
none
function(x) x
function(x) x
36115
spline.theta13
spline13
0
FALSE
none
function(x) x
function(x) x
Constrained linear effect
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
clinear
Number of hyperparmeters is 1.
37001
beta
b
1
FALSE
normal
1 10
function(x, REPLACE.ME.low, REPLACE.ME.high) { if (all(is.infinite(c(low, high))) || low == high) { stopifnot(low < high) return(x) } else if (all(is.finite(c(low, high)))) { stopifnot(low < high) return(log(-(low - x) / (high - x))) } else if (is.finite(low) && is.infinite(high) && high > low) { return(log(x - low)) } else { stop("Condition not yet implemented") } }
function(x, REPLACE.ME.low, REPLACE.ME.high) { if (all(is.infinite(c(low, high))) || low == high) { stopifnot(low < high) return(x) } else if (all(is.finite(c(low, high)))) { stopifnot(low < high) return(low + exp(x) / (1 + exp(x)) * (high - low)) } else if (is.finite(low) && is.infinite(high) && high > low) { return(low + exp(x)) } else { stop("Condition not yet implemented") } }
Sigmoidal effect of a covariate
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
sigm
Number of hyperparmeters is 3.
38001
beta
b
1
FALSE
normal
1 10
function(x) x
function(x) x
38002
loghalflife
halflife
3
FALSE
loggamma
3 1
function(x) log(x)
function(x) exp(x)
38003
logshape
shape
0
FALSE
loggamma
10 10
function(x) log(x)
function(x) exp(x)
Reverse sigmoidal effect of a covariate
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
sigm
Number of hyperparmeters is 3.
39001
beta
b
1
FALSE
normal
1 10
function(x) x
function(x) x
39002
loghalflife
halflife
3
FALSE
loggamma
3 1
function(x) log(x)
function(x) exp(x)
39003
logshape
shape
0
FALSE
loggamma
10 10
function(x) log(x)
function(x) exp(x)
A nonlinear model of a covariate
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
log1exp
Number of hyperparmeters is 3.
39011
beta
b
1
FALSE
normal
0 1
function(x) x
function(x) x
39012
alpha
a
0
FALSE
normal
0 1
function(x) x
function(x) x
39013
gamma
g
0
FALSE
normal
0 1
function(x) x
function(x) x
A nonlinear model of a covariate
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
logdist
Number of hyperparmeters is 3.
39021
beta
b
1
FALSE
normal
0 1
function(x) x
function(x) x
39022
alpha1
a1
0
FALSE
loggamma
0.1 1
function(x) log(x)
function(x) exp(x)
39023
alpha2
a2
0
FALSE
loggamma
0.1 1
function(x) log(x)
function(x) exp(x)
Valid models in this section are:
Exchangeable correlations
Number of hyperparmeters is 1.
40001
logit correlation
rho
1
FALSE
normal
0 0.2
function(x, REPLACE.ME.ngroup) log((1 + x * (ngroup - 1)) / (1 - x))
function(x, REPLACE.ME.ngroup) (exp(x) - 1) / (exp(x) + ngroup - 1)
Exchangeable positive correlations
Number of hyperparmeters is 1.
40101
logit correlation
rho
1
FALSE
pc.cor0
0.5 0.5
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
AR(1) correlations
Number of hyperparmeters is 1.
41001
logit correlation
rho
2
FALSE
normal
0 0.15
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
AR(p) correlations
Number of hyperparmeters is 11.
42001
log precision
prec
0
TRUE
pc.prec
3 0.01
function(x) log(x)
function(x) exp(x)
42002
pacf1
pacf1
2
FALSE
pc.cor0
0.5 0.5
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42003
pacf2
pacf2
0
FALSE
pc.cor0
0.5 0.4
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42004
pacf3
pacf3
0
FALSE
pc.cor0
0.5 0.3
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42005
pacf4
pacf4
0
FALSE
pc.cor0
0.5 0.2
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42006
pacf5
pacf5
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42007
pacf6
pacf6
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42008
pacf7
pacf7
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42009
pacf8
pacf8
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42010
pacf9
pacf9
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
42011
pacf10
pacf10
0
FALSE
pc.cor0
0.5 0.1
function(x) log((1 + x) / (1 - x))
function(x) 2 * exp(x) / (1 + exp(x)) - 1
Random walk of order 1
Number of hyperparmeters is 1.
43001
log precision
prec
loggamma
1 5e-05
0
TRUE
function(x) log(x)
function(x) exp(x)
Random walk of order 2
Number of hyperparmeters is 1.
44001
log precision
prec
loggamma
1 5e-05
0
TRUE
function(x) log(x)
function(x) exp(x)
Besag model
Number of hyperparmeters is 1.
45001
log precision
prec
loggamma
1 5e-05
0
TRUE
function(x) log(x)
function(x) exp(x)
Independent model
Number of hyperparmeters is 1.
46001
log precision
prec
loggamma
1 5e-05
0
TRUE
function(x) log(x)
function(x) exp(x)
Valid models in this section are:
Random walk of order 1
Number of hyperparmeters is 0.
Random walk of order 2
Number of hyperparmeters is 0.
Valid models in this section are:
Gaussian mixture
Number of hyperparmeters is 1.
47001
log precision
prec
Precision for the Gaussian observations
Log precision for the Gaussian observations
pc.prec
1 0.01
0
FALSE
function(x) log(x)
function(x) exp(x)
LogGamma mixture
Number of hyperparmeters is 1.
47101
log precision
prec
pc.mgamma
4.8
4
FALSE
function(x) log(x)
function(x) exp(x)
Minus-LogGamma mixture
Number of hyperparmeters is 1.
47201
log precision
prec
pc.mgamma
4.8
4
FALSE
function(x) log(x)
function(x) exp(x)
Valid models in this section are:
The default link
Number of hyperparmeters is 0.
The complementary log-log link
Number of hyperparmeters is 0.
The complement complementary log-log link
Number of hyperparmeters is 0.
The log-log link
Number of hyperparmeters is 0.
The identity link
Number of hyperparmeters is 0.
The inverse link
Number of hyperparmeters is 0.
The log-link
Number of hyperparmeters is 0.
The loga-link
Number of hyperparmeters is 0.
The negative log-link
Number of hyperparmeters is 0.
The logit-link
Number of hyperparmeters is 0.
The probit-link
Number of hyperparmeters is 0.
The cauchit-link
Number of hyperparmeters is 0.
The tan-link
circular
Number of hyperparmeters is 0.
The tanpi-link
circular
Number of hyperparmeters is 0.
The quantile-link
Number of hyperparmeters is 0.
The population quantile-link
Number of hyperparmeters is 0.
Logit link with sensitivity and specificity
disabled
NA
Number of hyperparmeters is 2.
48001
sensitivity
sens
logitbeta
10 5
1
FALSE
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
48002
specificity
spec
logitbeta
10 5
1
FALSE
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Log-link with an offset
logoffset
Number of hyperparmeters is 1.
49001
beta
b
normal
0 100
0
TRUE
function(x) log(x)
function(x) exp(x)
Logit-link with an offset
logitoffset
Number of hyperparmeters is 1.
49011
prob
p
normal
-1 100
-1
FALSE
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Robit link
robit
Number of hyperparmeters is 1.
49021
log degrees of freedom
dof
1.6094379124341
TRUE
pc.dof
50 0.5
function(x) log(x - 2)
function(x) 2 + exp(x)
Skew-normal link
linksn
Number of hyperparmeters is 2.
49031
skewness
skew
0.00123456789
FALSE
pc.sn
10
function(x, skew.max = 0.988) log((1 + x / skew.max) / (1 - x / skew.max))
function(x, skew.max = 0.988) skew.max * (2 * exp(x) / (1 + exp(x)) - 1)
49032
intercept
p0
0
FALSE
linksnintercept
0 0
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
GEVIT link
gevit
Number of hyperparmeters is 2.
49033
gev tail
tail
0.1
FALSE
pc.egptail
5 -0.5 0.5
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) log(-(interval[1] - x) / (interval[2] - x))
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) interval[1] + (interval[2] - interval[1]) * exp(x) / (1.0 + exp(x))
49034
gev p0
p0
0
FALSE
normal
0 1
function(x) log(x / (1 - x))
function(x) 1 / (1 + exp(-x))
Complement GEVIT link
gevit
Number of hyperparmeters is 2.
49035
gev tail
tail
-3
FALSE
pc.gevtail
7 0 0.5
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) log(-(interval[1] - x) / (interval[2] - x))
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) interval[1] + (interval[2] - interval[1]) * exp(x) / (1.0 + exp(x))
49036
gev p0
p0
0
FALSE
normal
0 1
function(x) log(x / (1 - x))
function(x) 1 / (1 + exp(-x))
Power logit link
powerlogit
Number of hyperparmeters is 2.
49131
power
power
0.00123456789
FALSE
normal
0 10
function(x) log(x)
function(x) exp(x)
49132
intercept
p0
0
FALSE
logitbeta
1 1
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
A test1-link function (experimental)
NA
Number of hyperparmeters is 1.
50001
beta
b
normal
0 100
0
FALSE
function(x) x
function(x) x
A special1-link function (experimental)
NA
Number of hyperparmeters is 11.
51001
log precision
prec
0
FALSE
loggamma
1 1
function(x) x
function(x) x
51002
beta1
beta1
0
FALSE
mvnorm
0 100
function(x) x
function(x) x
51003
beta2
beta2
0
FALSE
none
function(x) x
function(x) x
51004
beta3
beta3
0
FALSE
none
function(x) x
function(x) x
51005
beta4
beta4
0
FALSE
none
function(x) x
function(x) x
51006
beta5
beta5
0
FALSE
none
function(x) x
function(x) x
51007
beta6
beta6
0
FALSE
none
function(x) x
function(x) x
51008
beta7
beta7
0
FALSE
none
function(x) x
function(x) x
51009
beta8
beta8
0
FALSE
none
function(x) x
function(x) x
51010
beta9
beta9
0
FALSE
none
function(x) x
function(x) x
51011
beta10
beta10
0
FALSE
none
function(x) x
function(x) x
A special2-link function (experimental)
NA
Number of hyperparmeters is 1.
52001
beta
b
normal
0 10
0
FALSE
function(x) x
function(x) x
Valid models in this section are:
(do not use)
Number of hyperparmeters is 1.
53001
log precision
prec
13.8155105579643
TRUE
loggamma
1 1e-05
function(x) log(x)
function(x) exp(x)
Valid models in this section are:
A random walk of order 1 for the log-hazard
Number of hyperparmeters is 1.
54001
log precision
prec
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
A random walk of order 2 for the log-hazard
Number of hyperparmeters is 1.
55001
log precision
prec
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
An iid model for the log-hazard
Number of hyperparmeters is 1.
55501
log precision
prec
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
Valid models in this section are:
The fl likelihood
FALSE
TRUE
default identity
experimental
fl
Number of hyperparmeters is 0.
The Poisson likelihood
FALSE
TRUE
default log logoffset quantile test1 special1 special2
poisson
Number of hyperparmeters is 0.
The Normal approximation to the Poisson likelihood
FALSE
TRUE
default log logoffset
poisson
Number of hyperparmeters is 0.
The nzPoisson likelihood
FALSE
TRUE
default log logoffset
nzpoisson
Number of hyperparmeters is 0.
The Poisson likelihood (expert version)
FALSE
TRUE
default log logoffset quantile test1 special1 special2
poisson
Number of hyperparmeters is 0.
Then censored Poisson likelihood
FALSE
TRUE
default log logoffset test1 special1 special2
cenpoisson
Number of hyperparmeters is 0.
Then censored Poisson likelihood (version 2)
FALSE
TRUE
default log logoffset test1 special1 special2
cenpoisson2
Number of hyperparmeters is 0.
The generalized Poisson likelihood
FALSE
TRUE
default log logoffset
gpoisson
Number of hyperparmeters is 2.
56001
overdispersion
phi
Overdispersion for gpoisson
Log overdispersion for gpoisson
0
FALSE
loggamma
1 1
function(x) log(x)
function(x) exp(x)
56002
p
p
Parameter p for gpoisson
Parameter p_intern for gpoisson
1
TRUE
normal
1 100
function(x) x
function(x) x
The Poisson.special1 likelihood
FALSE
TRUE
default log
poisson-special
Number of hyperparmeters is 1.
56100
logit probability
prob
one-probability parameter for poisson.special1
intern one-probability parameter for poisson.special1
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
New 0-inflated Poisson
FALSE
TRUE
default log quantile
default logit cauchit probit cloglog ccloglog
0inflated
Number of hyperparmeters is 10.
56201
beta1
beta1
beta1 for 0poisson observations
beta1 for 0poisson observations
-4
FALSE
normal
-4 10
function(x) x
function(x) x
56202
beta2
beta2
beta2 for 0poisson observations
beta2 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56203
beta3
beta3
beta3 for 0poisson observations
beta3 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56204
beta4
beta4
beta4 for 0poisson observations
beta4 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56205
beta5
beta5
beta5 for 0poisson observations
beta5 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56206
beta6
beta6
beta6 for 0poisson observations
beta6 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56207
beta7
beta7
beta7 for 0poisson observations
beta7 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56208
beta8
beta8
beta8 for 0poisson observations
beta8 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56209
beta9
beta9
beta9 for 0poisson observations
beta9 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56210
beta10
beta10
beta10 for 0poisson observations
beta10 for 0poisson observations
0
FALSE
normal
0 10
function(x) x
function(x) x
New 0-inflated Poisson Swap
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog log sslogit logitoffset quantile pquantile robit sn powerlogit
default log
0inflated
Number of hyperparmeters is 10.
56301
beta1
beta1
beta1 for 0poissonS observations
beta1 for 0poissonS observations
-4
FALSE
normal
-4 10
function(x) x
function(x) x
56302
beta2
beta2
beta2 for 0poissonS observations
beta2 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56303
beta3
beta3
beta3 for 0poissonS observations
beta3 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56304
beta4
beta4
beta4 for 0poissonS observations
beta4 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56305
beta5
beta5
beta5 for 0poissonS observations
beta5 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56306
beta6
beta6
beta6 for 0poissonS observations
beta6 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56307
beta7
beta7
beta7 for 0poissonS observations
beta7 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56308
beta8
beta8
beta8 for 0poissonS observations
beta8 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56309
beta9
beta9
beta9 for 0poissonS observations
beta9 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56310
beta10
beta10
beta10 for 0poissonS observations
beta10 for 0poissonS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
The Bell likelihood
FALSE
TRUE
default log
bell
Number of hyperparmeters is 0.
New 0-inflated Binomial
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog log
default logit cauchit probit cloglog ccloglog
0inflated
Number of hyperparmeters is 10.
56401
beta1
beta1
beta1 for 0binomial observations
beta1 for 0binomial observations
-4
FALSE
normal
-4 10
function(x) x
function(x) x
56402
beta2
beta2
beta2 for 0binomial observations
beta2 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56403
beta3
beta3
beta3 for 0binomial observations
beta3 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56404
beta4
beta4
beta4 for 0binomial observations
beta4 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56405
beta5
beta5
beta5 for 0binomial observations
beta5 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56406
beta6
beta6
beta6 for 0binomial observations
beta6 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56407
beta7
beta7
beta7 for 0binomial observations
beta7 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56408
beta8
beta8
beta8 for 0binomial observations
beta8 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56409
beta9
beta9
beta9 for 0binomial observations
beta9 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56410
beta10
beta10
beta10 for 0binomial observations
beta10 for 0binomial observations
0
FALSE
normal
0 10
function(x) x
function(x) x
New 0-inflated Binomial Swap
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog log
default logit cauchit probit cloglog ccloglog
0inflated
Number of hyperparmeters is 10.
56501
beta1
beta1
beta1 for 0binomialS observations
beta1 for 0binomialS observations
-4
FALSE
normal
-4 10
function(x) x
function(x) x
56502
beta2
beta2
beta2 for 0binomialS observations
beta2 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56503
beta3
beta3
beta3 for 0binomialS observations
beta3 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56504
beta4
beta4
beta4 for 0binomialS observations
beta4 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56505
beta5
beta5
beta5 for 0binomialS observations
beta5 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56506
beta6
beta6
beta6 for 0binomialS observations
beta6 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56507
beta7
beta7
beta7 for 0binomialS observations
beta7 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56508
beta8
beta8
beta8 for 0binomialS observations
beta8 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56509
beta9
beta9
beta9 for 0binomialS observations
beta9 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56510
beta10
beta10
beta10 for 0binomialS observations
beta10 for 0binomialS observations
0
FALSE
normal
0 10
function(x) x
function(x) x
Binomial mixture
experimental
FALSE
TRUE
default logit probit
binomialmix
Number of hyperparmeters is 51.
56551
beta1
beta1
beta1 for binomialmix observations
beta1 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56552
beta2
beta2
beta2 for binomialmix observations
beta2 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56553
beta3
beta3
beta3 for binomialmix observations
beta3 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56554
beta4
beta4
beta4 for binomialmix observations
beta4 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56555
beta5
beta5
beta5 for binomialmix observations
beta5 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56556
beta6
beta6
beta6 for binomialmix observations
beta6 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56557
beta7
beta7
beta7 for binomialmix observations
beta7 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56558
beta8
beta8
beta8 for binomialmix observations
beta8 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56559
beta9
beta9
beta9 for binomialmix observations
beta9 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56560
beta10
beta10
beta10 for binomialmix observations
beta10 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56561
beta11
beta11
beta11 for binomialmix observations
beta11 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56562
beta12
beta12
beta12 for binomialmix observations
beta12 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56563
beta13
beta13
beta13 for binomialmix observations
beta13 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56564
beta14
beta14
beta14 for binomialmix observations
beta14 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56565
beta15
beta15
beta15 for binomialmix observations
beta15 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56566
beta16
beta16
beta16 for binomialmix observations
beta16 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56567
beta17
beta17
beta17 for binomialmix observations
beta17 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56568
beta18
beta18
beta18 for binomialmix observations
beta18 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56569
beta19
beta19
beta19 for binomialmix observations
beta19 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56570
beta20
beta20
beta20 for binomialmix observations
beta20 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56571
beta21
beta21
beta21 for binomialmix observations
beta21 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56572
beta22
beta22
beta22 for binomialmix observations
beta22 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56573
beta23
beta23
beta23 for binomialmix observations
beta23 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56574
beta24
beta24
beta24 for binomialmix observations
beta24 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56575
beta25
beta25
beta25 for binomialmix observations
beta25 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56576
beta26
beta26
beta26 for binomialmix observations
beta26 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56577
beta27
beta27
beta27 for binomialmix observations
beta27 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56578
beta28
beta28
beta28 for binomialmix observations
beta28 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56579
beta29
beta29
beta29 for binomialmix observations
beta29 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56580
beta30
beta30
beta30 for binomialmix observations
beta30 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56581
beta31
beta31
beta31 for binomialmix observations
beta31 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56582
beta32
beta32
beta32 for binomialmix observations
beta32 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56583
beta33
beta33
beta33 for binomialmix observations
beta33 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56584
beta34
beta34
beta34 for binomialmix observations
beta34 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56585
beta35
beta35
beta35 for binomialmix observations
beta35 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56586
beta36
beta36
beta36 for binomialmix observations
beta36 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56587
beta37
beta37
beta37 for binomialmix observations
beta37 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56588
beta38
beta38
beta38 for binomialmix observations
beta38 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56589
beta39
beta39
beta39 for binomialmix observations
beta39 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56590
beta40
beta40
beta40 for binomialmix observations
beta40 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56591
beta41
beta41
beta41 for binomialmix observations
beta41 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56592
beta42
beta42
beta42 for binomialmix observations
beta42 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56593
beta43
beta43
beta43 for binomialmix observations
beta43 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56594
beta44
beta44
beta44 for binomialmix observations
beta44 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56595
beta45
beta45
beta45 for binomialmix observations
beta45 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56596
beta46
beta46
beta46 for binomialmix observations
beta46 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56597
beta47
beta47
beta47 for binomialmix observations
beta47 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56598
beta48
beta48
beta48 for binomialmix observations
beta48 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56599
beta49
beta49
beta49 for binomialmix observations
beta49 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56600
beta50
beta50
beta50 for binomialmix observations
beta50 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
56601
beta51
beta51
beta51 for binomialmix observations
beta51 for binomialmix observations
0
FALSE
normal
0 100
function(x) x
function(x) x
The Binomial likelihood
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog log sslogit logitoffset quantile pquantile robit sn powerlogit gevit cgevit
binomial
Number of hyperparmeters is 0.
The Binomial likelihood (experimental version)
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog log sslogit logitoffset quantile pquantile robit sn powerlogit gevit cgevit
binomial
Number of hyperparmeters is 0.
Occupancy likelihood
FALSE
TRUE
default logit cloglog
default logit cloglog
occupancy
Number of hyperparmeters is 10.
56601
beta1
beta1
beta1 for occupancy observations
beta1 for occupancy observations
-2
FALSE
normal
-2 10
function(x) x
function(x) x
56602
beta2
beta2
beta2 for occupancy observations
beta2 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56603
beta3
beta3
beta3 for occupancy observations
beta3 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56604
beta4
beta4
beta4 for occupancy observations
beta4 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56605
beta5
beta5
beta5 for occupancy observations
beta5 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56606
beta6
beta6
beta6 for occupancy observations
beta6 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56607
beta7
beta7
beta7 for occupancy observations
beta7 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56608
beta8
beta8
beta8 for occupancy observations
beta8 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56609
beta9
beta9
beta9 for occupancy observations
beta9 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
56610
beta10
beta10
beta10 for occupancy observations
beta10 for occupancy observations
0
FALSE
normal
0 10
function(x) x
function(x) x
Likelihood for the proportional odds model
FALSE
TRUE
default identity
pom
Number of hyperparmeters is 10.
57101
theta1
theta1
theta1 for POM
theta1 for POM
NA
FALSE
dirichlet
3
function(x) x
function(x) x
57102
theta2
theta2
theta2 for POM
theta2 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
57103
theta3
theta3
theta3 for POM
theta3 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
57104
theta4
theta4
theta4 for POM
theta4 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
57105
theta5
theta5
theta5 for POM
theta5 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
57106
theta6
theta6
theta6 for POM
theta6 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
57107
theta7
theta7
theta7 for POM
theta7 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
57108
theta8
theta8
theta8 for POM
theta8 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
57109
theta9
theta9
theta9 for POM
theta9 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
57110
theta10
theta10
theta10 for POM
theta10 for POM
NA
FALSE
none
function(x) log(x)
function(x) exp(x)
The blended Generalized Extreme Value likelihood
FALSE
FALSE
default identity log
bgev
Number of hyperparmeters is 12.
57201
spread
sd
spread for BGEV observations
log spread for BGEV observations
0
FALSE
loggamma
1 3
function(x) log(x)
function(x) exp(x)
57202
tail
xi
tail for BGEV observations
intern tail for BGEV observations
-4
FALSE
pc.gevtail
7 0 0.5
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) log(-(interval[1] - x) / (interval[2] - x))
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) interval[1] + (interval[2] - interval[1]) * exp(x) / (1.0 + exp(x))
57203
beta1
beta1
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57204
beta2
beta2
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57205
beta3
beta3
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57206
beta4
beta4
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57207
beta5
beta5
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57208
beta6
beta6
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57209
beta7
beta7
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57210
beta8
beta8
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57211
beta9
beta9
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
57212
beta10
beta
MUST BE FIXED
MUST BE FIXED
NA
FALSE
normal
0 300
function(x) x
function(x) x
The Gamma likelihood
FALSE
FALSE
default log quantile
gamma
Number of hyperparmeters is 1.
58001
precision parameter
prec
Precision-parameter for the Gamma observations
Intern precision-parameter for the Gamma observations
4.60517018598809
FALSE
loggamma
1 0.01
function(x) log(x)
function(x) exp(x)
The modal Gamma likelihood
FALSE
FALSE
default log
mgamma
Number of hyperparmeters is 1.
58002
precision parameter
prec
Precision-parameter for the modal Gamma observations
Intern precision-parameter for the modal Gamma observations
4.60517018598809
FALSE
loggamma
1 0.01
function(x) log(x)
function(x) exp(x)
The Gamma likelihood (survival)
TRUE
FALSE
default log neglog quantile
gammasurv
Number of hyperparmeters is 11.
58101
precision parameter
prec
Precision-parameter for the Gamma surv observations
Intern precision-parameter for the Gamma surv observations
0
FALSE
loggamma
1 0.01
function(x) log(x)
function(x) exp(x)
58102
beta1
beta1
beta1 for Gamma-Cure
beta1 for Gamma-Cure
-7
FALSE
normal
-4 100
function(x) x
function(x) x
58103
beta2
beta2
beta2 for Gamma-Cure
beta2 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58104
beta3
beta3
beta3 for Gamma-Cure
beta3 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58105
beta4
beta4
beta4 for Ga mma-Cure
beta4 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58106
beta5
beta5
beta5 for Gamma-Cure
beta5 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58107
beta6
beta6
beta6 for Gamma-Cure
beta6 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58108
beta7
beta7
beta7 for Gamma-Cure
beta7 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58109
beta8
beta8
beta8 for Gamma-Cure
beta8 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58110
beta9
beta9
beta9 for Gamma-Cure
beta9 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58111
beta10
beta10
beta10 for Gamma-Cure
beta10 for Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
The modal Gamma likelihood (survival)
TRUE
FALSE
default log neglog
agamma
Number of hyperparmeters is 11.
58121
precision parameter
prec
Precision-parameter for the modal Gamma surv observations
Intern precision-parameter for the modal Gamma surv observations
0
FALSE
loggamma
1 0.01
function(x) log(x)
function(x) exp(x)
58122
beta1
beta1
beta1 for modal Gamma-Cure
beta1 for modal Gamma-Cure
-7
FALSE
normal
-4 100
function(x) x
function(x) x
58123
beta2
beta2
beta2 for modal Gamma-Cure
beta2 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58124
beta3
beta3
beta3 for modal Gamma-Cure
beta3 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58125
beta4
beta4
beta4 for Ga mma-Cure
beta4 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58126
beta5
beta5
beta5 for modal Gamma-Cure
beta5 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58127
beta6
beta6
beta6 for modal Gamma-Cure
beta6 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58128
beta7
beta7
beta7 for modal Gamma-Cure
beta7 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58129
beta8
beta8
beta8 for modal Gamma-Cure
beta8 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58130
beta9
beta9
beta9 for modal Gamma-Cure
beta9 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58131
beta10
beta10
beta10 for modal Gamma-Cure
beta10 for modal Gamma-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
A special case of the Gamma likelihood
FALSE
FALSE
default log neglog
gammajw
Number of hyperparmeters is 0.
A special case of the Gamma likelihood (survival)
TRUE
FALSE
default log
gammajw
Number of hyperparmeters is 10.
58200
beta1
beta1
beta1 for GammaJW-Cure
beta1 for GammaJW-Cure
-7
FALSE
normal
-4 100
function(x) x
function(x) x
58201
beta2
beta2
beta1 for GammaJW-Cure
beta1 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58202
beta3
beta3
beta3 for GammaJW-Cure
beta3 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58203
beta4
beta4
beta4 for GammaJW-Cure
beta4 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58204
beta5
beta5
beta5 for GammaJW-Cure
beta5 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58205
beta6
beta6
beta6 for GammaJW-Cure
beta6 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58206
beta7
beta7
beta7 for GammaJW-Cure
beta7 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58207
beta8
beta8
beta8 for GammaJW-Cure
beta8 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58208
beta9
beta9
beta9 for GammaJW-Cure
beta9 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
58209
beta10
beta10
beta10 for GammaJW-Cure
beta10 for GammaJW-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
A Gamma generalisation of the Poisson likelihood
FALSE
FALSE
default log
gammacount
Number of hyperparmeters is 1.
59001
log alpha
alpha
Log-alpha parameter for Gammacount observations
Alpha parameter for Gammacount observations
0
FALSE
pc.gammacount
3
function(x) log(x)
function(x) exp(x)
A quantile version of the Kumar likelihood
FALSE
FALSE
default logit loga cauchit
qkumar
Number of hyperparmeters is 1.
60001
precision parameter
prec
precision for qkumar observations
log precision for qkumar observations
1
FALSE
loggamma
1 0.1
function(x, sc = 0.1) log(x) / sc
function(x, sc = 0.1) exp(sc * x)
A quantile loglogistic likelihood
FALSE
FALSE
default log neglog
qloglogistic
Number of hyperparmeters is 1.
60011
log alpha
alpha
alpha for qloglogistic observations
log alpha for qloglogistic observations
1
FALSE
loggamma
25 25
function(x) log(x)
function(x) exp(x)
A quantile loglogistic likelihood (survival)
TRUE
FALSE
default log neglog
qloglogistic
Number of hyperparmeters is 11.
60021
log alpha
alpha
alpha for qloglogisticsurv observations
log alpha for qloglogisticsurv observations
1
FALSE
loggamma
25 25
function(x) log(x)
function(x) exp(x)
60022
beta1
beta1
beta1 for qlogLogistic-Cure
beta1 for logLogistic-Cure
-5
FALSE
normal
-4 100
function(x) x
function(x) x
60023
beta2
beta2
beta2 for qlogLogistic-Cure
beta2 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
60024
beta3
beta3
beta3 for qlogLogistic-Cure
beta3 for qlogLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
60025
beta4
beta4
beta4 for qlogLogistic-Cure
beta4 for qlogLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
60026
beta5
beta5
beta5 for qlogLogistic-Cure
beta5 for qlogLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
60027
beta6
beta6
beta6 for qlogLogistic-Cure
beta6 for qlogLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
60028
beta7
beta7
beta7 for qlogLogistic-Cure
beta7 for qlogLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
60029
beta8
beta8
beta8 for qlogLogistic-Cure
beta8 for qlogLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
60030
beta9
beta9
beta9 for qlogLogistic-Cure
beta9 for qlogLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
60031
beta10
beta10
beta10 for qlogLogistic-Cure
beta10 for qlogLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
The Beta likelihood
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog
beta
Number of hyperparmeters is 1.
61001
precision parameter
phi
precision parameter for the beta observations
intern precision-parameter for the beta observations
2.30258509299405
FALSE
loggamma
1 0.1
function(x) log(x)
function(x) exp(x)
The ordered Beta likelihood
experimental
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog
obeta
Number of hyperparmeters is 3.
61101
precision parameter
phi
precision-parameter for the obeta observations
intern precision-parameter for the obeta observations
2.30258509299405
FALSE
loggamma
1 0.1
function(x) log(x)
function(x) exp(x)
61102
offset location
loc
offset location-parameter for the obeta observations
offset location-parameter for the obeta observations
0
FALSE
normal
0 10
function(x) x
function(x) x
61103
offset width
width
offset width-parameter for the obeta observations
offset width-parameter for the obeta observations
0
FALSE
loggamma
1 1
function(x) log(x)
function(x) exp(x)
The Beta-Binomial likelihood
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
betabinomial
Number of hyperparmeters is 1.
62001
overdispersion
rho
overdispersion for the betabinomial observations
intern overdispersion for the betabinomial observations
0
FALSE
gaussian
0 0.4
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
The Beta-Binomial Normal approximation likelihood
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
betabinomialna
Number of hyperparmeters is 1.
62101
overdispersion
rho
overdispersion for the betabinomialna observations
intern overdispersion for the betabinomialna observations
0
FALSE
gaussian
0 0.4
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
The clustered Binomial likelihood
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
cbinomial
Number of hyperparmeters is 0.
The negBinomial likelihood
FALSE
TRUE
default log logoffset quantile
nbinomial
Number of hyperparmeters is 1.
63001
size
size
size for the nbinomial observations (1/overdispersion)
log size for the nbinomial observations (1/overdispersion)
2.30258509299405
FALSE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
The negBinomial2 likelihood
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog
nbinomial
Number of hyperparmeters is 0.
The CenNegBinomial2 likelihood (similar to cenpoisson2)
FALSE
TRUE
default log logoffset quantile
cennbinomial2
Number of hyperparmeters is 1.
63101
size
size
size for the cennbinomial2 observations (1/overdispersion)
log size for the cennbinomial2 observations (1/overdispersion)
2.30258509299405
FALSE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
The simplex likelihood
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog
simplex
Number of hyperparmeters is 1.
64001
log precision
prec
Precision for the Simplex observations
Log precision for the Simplex observations
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
The Gaussian likelihoood
FALSE
FALSE
default identity logit loga cauchit log logoffset
gaussian
Number of hyperparmeters is 2.
65001
log precision
prec
Precision for the Gaussian observations
Log precision for the Gaussian observations
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
65002
log precision offset
precoffset
NOT IN USE
NOT IN USE
72.0873067782343
TRUE
none
function(x) log(x)
function(x) exp(x)
The stdGaussian likelihoood
FALSE
FALSE
default identity logit loga cauchit log logoffset
gaussian
Number of hyperparmeters is 0.
The GaussianJW likelihoood
FALSE
FALSE
default logit probit
gaussianjw
Number of hyperparmeters is 3.
65101
beta1
beta1
beta1 for GaussianJW observations
beta1 for GaussianJW observations
0
FALSE
normal
0 100
function(x) x
function(x) x
65102
beta2
beta2
beta2 for GaussianJW observations
beta2 for GaussianJW observations
1
FALSE
normal
1 100
function(x) x
function(x) x
65103
beta3
beta3
beta3 for GaussianJW observations
beta3 for GaussianJW observations
-1
FALSE
normal
-1 100
function(x) x
function(x) x
The aggregated Gaussian likelihoood
FALSE
FALSE
default identity logit loga cauchit log logoffset
agaussian
Number of hyperparmeters is 1.
66001
log precision
prec
Precision for the AggGaussian observations
Log precision for the AggGaussian observations
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
Generalized Gaussian
FALSE
FALSE
default identity
default log
ggaussian
Number of hyperparmeters is 10.
66501
beta1
beta1
beta1 for ggaussian observations
beta1 for ggaussian observations
4
FALSE
normal
9.33 0.61
function(x) x
function(x) x
66502
beta2
beta2
beta2 for ggaussian observations
beta2 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
66503
beta3
beta3
beta3 for ggaussian observations
beta3 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
66504
beta4
beta4
beta4 for ggaussian observations
beta4 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
66505
beta5
beta5
beta5 for ggaussian observations
beta5 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
66506
beta6
beta6
beta6 for ggaussian observations
beta6 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
66507
beta7
beta7
beta7 for ggaussian observations
beta7 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
66508
beta8
beta8
beta8 for ggaussian observations
beta8 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
66509
beta9
beta9
beta9 for ggaussian observations
beta9 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
66510
beta10
beta10
beta10 for ggaussian observations
beta10 for ggaussian observations
0
FALSE
normal
0 10
function(x) x
function(x) x
Generalized GaussianS
FALSE
FALSE
default log
default identity
ggaussian
Number of hyperparmeters is 10.
66601
beta1
beta1
beta1 for ggaussianS observations
beta1 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66602
beta2
beta2
beta2 for ggaussianS observations
beta2 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66603
beta3
beta3
beta3 for ggaussianS observations
beta3 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66604
beta4
beta4
beta4 for ggaussianS observations
beta4 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66605
beta5
beta5
beta5 for ggaussianS observations
beta5 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66606
beta6
beta6
beta6 for ggaussianS observations
beta6 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66607
beta7
beta7
beta7 for ggaussianS observations
beta7 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66608
beta8
beta8
beta8 for ggaussianS observations
beta8 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66609
beta9
beta9
beta9 for ggaussianS observations
beta9 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
66610
beta10
beta10
beta10 for ggaussianS observations
beta10 for ggaussianS observations
0
FALSE
normal
0 0.001
function(x) x
function(x) x
The Box-Cox Gaussian likelihoood
disabled
FALSE
FALSE
default identity
bcgaussian
Number of hyperparmeters is 2.
65010
log precision
prec
Precision for the Box-Cox Gaussian observations
Log precision for the Box-Cox Gaussian observations
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
65011
Box-Cox transformation parameter
lambda
NOT IN USE
NOT IN USE
1
FALSE
gaussian
1 8
function(x) x
function(x) x
The exponential power likelihoood
experimental
FALSE
FALSE
default identity quantile
exppower
Number of hyperparmeters is 2.
65021
log precision
prec
NOT IN USE
NOT IN USE
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
65022
power
beta
NOT IN USE
NOT IN USE
0
FALSE
gaussian
0 100
function(x) log(x-1)
function(x) 1+exp(x)
The SEM likelihoood
FALSE
FALSE
default identity
sem
Number of hyperparmeters is 0.
Randomly censored Poisson
experimental
FALSE
TRUE
default log
rcpoisson
Number of hyperparmeters is 10.
66701
beta1
beta1
beta1 rcpoisson observations
beta1 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66702
beta2
beta2
beta2 rcpoisson observations
beta2 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66703
beta3
beta3
beta3 rcpoisson observations
beta3 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66704
beta4
beta4
beta4 rcpoisson observations
beta4 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66705
beta5
beta5
beta5 rcpoisson observations
beta5 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66706
beta6
beta6
beta6 rcpoisson observations
beta6 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66707
beta7
beta7
beta7 rcpoisson observations
beta7 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66708
beta8
beta8
beta8 rcpoisson observations
beta8 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66709
beta9
beta9
beta9 rcpoisson observations
beta9 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66710
beta10
beta10
beta10 rcpoisson observations
beta10 rcpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
Thinned Poisson
experimental
FALSE
TRUE
default log
tpoisson
Number of hyperparmeters is 10.
66721
beta1
beta1
beta1 tpoisson observations
beta1 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66722
beta2
beta2
beta2 tpoisson observations
beta2 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66723
beta3
beta3
beta3 tpoisson observations
beta3 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66724
beta4
beta4
beta4 tpoisson observations
beta4 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66725
beta5
beta5
beta5 tpoisson observations
beta5 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66726
beta6
beta6
beta6 tpoisson observations
beta6 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66727
beta7
beta7
beta7 tpoisson observations
beta7 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66728
beta8
beta8
beta8 tpoisson observations
beta8 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66729
beta9
beta9
beta9 tpoisson observations
beta9 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
66730
beta10
beta10
beta10 tpoisson observations
beta10 tpoisson observations
0
FALSE
normal
0 100
function(x) x
function(x) x
The circular Gaussian likelihoood
FALSE
FALSE
default tan tan.pi
circular-normal
disabled
Number of hyperparmeters is 1.
67001
log precision parameter
prec
Precision parameter for the Circular Normal observations
Log precision parameter for the Circular Normal observations
2
FALSE
loggamma
1 0.01
function(x) log(x)
function(x) exp(x)
The wrapped Cauchy likelihoood
FALSE
FALSE
default tan tan.pi
wrapped-cauchy
disabled
Number of hyperparmeters is 1.
68001
log precision parameter
prec
Precision parameter for the Wrapped Cauchy observations
Log precision parameter for the Wrapped Cauchy observations
2
FALSE
loggamma
1 0.005
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
(experimental)
FALSE
FALSE
default identity
iidgamma
experimental
Number of hyperparmeters is 2.
69001
logshape
shape
Shape parameter for iid-gamma
Log shape parameter for iid-gamma
0
FALSE
loggamma
100 100
function(x) log(x)
function(x) exp(x)
69002
lograte
rate
Rate parameter for iid-gamma
Log rate parameter for iid-gamma
0
FALSE
loggamma
100 100
function(x) log(x)
function(x) exp(x)
(experimental)
FALSE
FALSE
default logit loga
iidlogitbeta
experimental
Number of hyperparmeters is 2.
70001
log.a
a
a parameter for iid-beta
Log a parameter for iid-beta
1
FALSE
loggamma
1 1
function(x) log(x)
function(x) exp(x)
70002
log.b
b
Rate parameter for iid-gamma
Log rate parameter for iid-gamma
1
FALSE
loggamma
1 1
function(x) log(x)
function(x) exp(x)
(experimental)
FALSE
FALSE
default identity
loggammafrailty
experimental
Number of hyperparmeters is 1.
71001
log precision
prec
precision for the gamma frailty
log precision for the gamma frailty
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
The Logistic likelihoood
FALSE
FALSE
default identity
logistic
Number of hyperparmeters is 1.
72001
log precision
prec
precision for the logistic observations
log precision for the logistic observations
1
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
The Skew-Normal likelihoood
FALSE
FALSE
default identity
sn
Number of hyperparmeters is 2.
74001
log precision
prec
precision for skew-normal observations
log precision for skew-normal observations
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
74002
logit skew
skew
Skewness for skew-normal observations
Intern skewness for skew-normal observations
0.00123456789
FALSE
pc.sn
10
function(x, skew.max = 0.988) log((1 + x / skew.max) / (1 - x / skew.max))
function(x, skew.max = 0.988) skew.max * (2 * exp(x) / (1 + exp(x)) - 1)
The Generalized Extreme Value likelihood
FALSE
FALSE
default identity
disabled: Use likelihood model 'bgev' instead; see inla.doc('bgev')
gev
Number of hyperparmeters is 2.
76001
log precision
prec
precision for GEV observations
log precision for GEV observations
4
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
76002
tail parameter
tail
tail parameter for GEV observations
tail parameter for GEV observations
0
FALSE
gaussian
0 25
function(x) x
function(x) x
The log-Normal likelihood
FALSE
FALSE
default identity
lognormal
Number of hyperparmeters is 1.
77101
log precision
prec
Precision for the lognormal observations
Log precision for the lognormal observations
0
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
The log-Normal likelihood (survival)
TRUE
FALSE
default identity
lognormal
Number of hyperparmeters is 11.
78001
log precision
prec
Precision for the lognormalsurv observations
Log precision for the lognormalsurv observations
0
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
78002
beta1
beta1
beta1 for logNormal-Cure
beta1 for logNormal-Cure
-7
FALSE
normal
-4 100
function(x) x
function(x) x
78003
beta2
beta2
beta2 for logNormal-Cure
beta2 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78004
beta3
beta3
beta3 for logNormal-Cure
beta3 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78005
beta4
beta4
beta4 for logNormal-Cure
beta4 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78006
beta5
beta5
beta5 for logNormal-Cure
beta5 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78007
beta6
beta6
beta6 for logNormal-Cure
beta6 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78008
beta7
beta7
beta7 for logNormal-Cure
beta7 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78009
beta8
beta8
beta8 for logNormal-Cure
beta8 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78010
beta9
beta9
beta9 for logNormal-Cure
beta9 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78011
beta10
beta10
beta10 for logNormal-Cure
beta10 for logNormal-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
The Exponential likelihood
FALSE
FALSE
default log
exponential
Number of hyperparmeters is 0.
The Exponential likelihood (survival)
TRUE
FALSE
default log neglog
exponential
Number of hyperparmeters is 10.
78020
beta1
beta1
beta1 for Exp-Cure
beta1 for Exp-Cure
-4
FALSE
normal
-1 100
function(x) x
function(x) x
78021
beta2
beta2
beta2 for Exp-Cure
beta2 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78022
beta3
beta3
beta3 for Exp-Cure
beta3 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78023
beta4
beta4
beta4 for Exp-Cure
beta4 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78024
beta5
beta5
beta5 for Exp-Cure
beta5 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78025
beta6
beta6
beta6 for Exp-Cure
beta6 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78026
beta7
beta7
beta7 for Exp-Cure
beta7 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78027
beta8
beta8
beta8 for Exp-Cure
beta8 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78028
beta9
beta9
beta9 for Exp-Cure
beta9 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
78029
beta10
beta10
beta10 for Exp-Cure
beta10 for Exp-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
Cox-proportional hazard likelihood
TRUE
TRUE
default log neglog
coxph
Number of hyperparmeters is 0.
The Weibull likelihood
FALSE
FALSE
default log neglog quantile
weibull
Number of hyperparmeters is 1.
79001
log alpha
alpha
alpha parameter for weibull
alpha_intern for weibull
-2
FALSE
pc.alphaw
5
function(x, sc = 0.1) log(x) / sc
function(x, sc = 0.1) exp(sc * x)
The Weibull likelihood (survival)
TRUE
FALSE
default log neglog quantile
weibull
Number of hyperparmeters is 11.
79101
log alpha
alpha
alpha parameter for weibullsurv
alpha_intern for weibullsurv
-2
FALSE
pc.alphaw
5
function(x, sc = 0.1) log(x) / sc
function(x, sc = 0.1) exp(sc * x)
79102
beta1
beta1
beta1 for Weibull-Cure
beta1 for Weibull-Cure
-7
FALSE
normal
-4 100
function(x) x
function(x) x
79103
beta2
beta2
beta2 for Weibull-Cure
beta2 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
79104
beta3
beta3
beta3 for Weibull-Cure
beta3 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
79105
beta4
beta4
beta4 for Weibull-Cure
beta4 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
79106
beta5
beta5
beta5 for Weibull-Cure
beta5 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
79107
beta6
beta6
beta6 for Weibull-Cure
beta6 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
79108
beta7
beta7
beta7 for Weibull-Cure
beta7 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
79109
beta8
beta8
beta8 for Weibull-Cure
beta8 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
79110
beta9
beta9
beta9 for Weibull-Cure
beta9 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
79111
beta10
beta10
beta10 for Weibull-Cure
beta10 for Weibull-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
The loglogistic likelihood
FALSE
FALSE
default log neglog
loglogistic
Number of hyperparmeters is 1.
80001
log alpha
alpha
alpha for loglogistic observations
log alpha for loglogistic observations
1
FALSE
loggamma
25 25
function(x) log(x)
function(x) exp(x)
The loglogistic likelihood (survival)
TRUE
FALSE
default log neglog
loglogistic
Number of hyperparmeters is 11.
80011
log alpha
alpha
alpha for loglogisticsurv observations
log alpha for loglogisticsurv observations
1
FALSE
loggamma
25 25
function(x) log(x)
function(x) exp(x)
80012
beta1
beta1
beta1 for logLogistic-Cure
beta1 for logLogistic-Cure
-5
FALSE
normal
-4 100
function(x) x
function(x) x
80013
beta2
beta2
beta2 for logLogistic-Cure
beta2 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
80014
beta3
beta3
beta3 for logLogistic-Cure
beta3 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
80015
beta4
beta4
beta4 for logLogistic-Cure
beta4 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
80016
beta5
beta5
beta5 for logLogistic-Cure
beta5 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
80017
beta6
beta6
beta6 for logLogistic-Cure
beta6 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
80018
beta7
beta7
beta7 for logLogistic-Cure
beta7 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
80019
beta8
beta8
beta8 for logLogistic-Cure
beta8 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
80020
beta9
beta9
beta9 for logLogistic-Cure
beta9 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
80021
beta10
beta10
beta10 for logLogistic-Cure
beta10 for logLogistic-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
The Gaussian stochvol likelihood
FALSE
FALSE
default log
stochvolgaussian
Number of hyperparmeters is 1.
82001
log precision
prec
Offset precision for stochvol
Log offset precision for stochvol
500
TRUE
loggamma
1 0.005
function(x) log(x)
function(x) exp(x)
The Log-Normal stochvol likelihood
FALSE
FALSE
default log
stochvolln
Number of hyperparmeters is 1.
82011
offset
c
Mean offset for stochvolln
Mean offset for stochvolln
0
FALSE
normal
0 10
function(x) x
function(x) x
The SkewNormal stochvol likelihood
FALSE
FALSE
default log
stochvolsn
Number of hyperparmeters is 2.
82101
logit skew
skew
Skewness for stochvol_sn observations
Intern skewness for stochvol_sn observations
0.00123456789
FALSE
pc.sn
10
function(x, skew.max = 0.988) log((1 + x / skew.max) / (1 - x / skew.max))
function(x, skew.max = 0.988) skew.max * (2 * exp(x) / (1 + exp(x)) - 1)
82102
log precision
prec
Offset precision for stochvol_sn
Log offset precision for stochvol_sn
500
TRUE
loggamma
1 0.005
function(x) log(x)
function(x) exp(x)
The Student-t stochvol likelihood
FALSE
FALSE
default log
stochvolt
Number of hyperparmeters is 1.
83001
log degrees of freedom
dof
degrees of freedom for stochvol student-t
dof_intern for stochvol student-t
4
FALSE
pc.dof
15 0.5
function(x) log(x - 2)
function(x) 2 + exp(x)
The Normal inverse Gaussian stochvol likelihood
FALSE
FALSE
default log
stochvolnig
Number of hyperparmeters is 2.
84001
skewness
skew
skewness_param_intern for stochvol-nig
skewness parameter for stochvol-nig
0
FALSE
gaussian
0 10
function(x) x
function(x) x
84002
shape
shape
shape parameter for stochvol-nig
shape_param_intern for stochvol-nig
0
FALSE
loggamma
1 0.5
function(x) log(x - 1)
function(x) 1 + exp(x)
Zero-inflated Poisson, type 0
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 1.
85001
logit probability
prob
zero-probability parameter for zero-inflated poisson_0
intern zero-probability parameter for zero-inflated poisson_0
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero-inflated Poisson, type 1
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 1.
86001
logit probability
prob
zero-probability parameter for zero-inflated poisson_1
intern zero-probability parameter for zero-inflated poisson_1
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero-inflated Poisson, type 2
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 1.
87001
log alpha
a
zero-probability parameter for zero-inflated poisson_2
intern zero-probability parameter for zero-inflated poisson_2
0.693147180559945
FALSE
gaussian
0.693147180559945 1
function(x) log(x)
function(x) exp(x)
Zero-inflated censored Poisson, type 0
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 1.
87101
logit probability
prob
zero-probability parameter for zero-inflated poisson_0
intern zero-probability parameter for zero-inflated poisson_0
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero-inflated censored Poisson, type 1
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 1.
87201
logit probability
prob
zero-probability parameter for zero-inflated poisson_1
intern zero-probability parameter for zero-inflated poisson_1
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero-inflated Beta-Binomial, type 0
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
zeroinflated
Number of hyperparmeters is 2.
88001
overdispersion
rho
rho for zero-inflated betabinomial_0
rho_intern for zero-inflated betabinomial_0
0
FALSE
gaussian
0 0.4
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
88002
logit probability
prob
zero-probability parameter for zero-inflated betabinomial_0
intern zero-probability parameter for zero-inflated betabinomial_0
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero-inflated Beta-Binomial, type 1
FALSE
TRUE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
zeroinflated
Number of hyperparmeters is 2.
89001
overdispersion
rho
rho for zero-inflated betabinomial_1
rho_intern for zero-inflated betabinomial_1
0
FALSE
gaussian
0 0.4
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
89002
logit probability
prob
zero-probability parameter for zero-inflated betabinomial_1
intern zero-probability parameter for zero-inflated betabinomial_1
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero-inflated Binomial, type 0
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
zeroinflated
Number of hyperparmeters is 1.
90001
logit probability
prob
zero-probability parameter for zero-inflated binomial_0
intern zero-probability parameter for zero-inflated binomial_0
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero-inflated Binomial, type 1
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
zeroinflated
Number of hyperparmeters is 1.
91001
logit probability
prob
zero-probability parameter for zero-inflated binomial_1
intern zero-probability parameter for zero-inflated binomial_1
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero-inflated Binomial, type 2
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
zeroinflated
Number of hyperparmeters is 1.
92001
alpha
alpha
zero-probability parameter for zero-inflated binomial_2
intern zero-probability parameter for zero-inflated binomial_2
-1
FALSE
gaussian
-1 0.2
function(x) log(x)
function(x) exp(x)
Zero and N inflated binomial, type 2
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
NA
Number of hyperparmeters is 2.
93001
alpha1
alpha1
alpha1 parameter for zero-n-inflated binomial_2
intern alpha1 parameter for zero-n-inflated binomial_2
-1
FALSE
gaussian
-1 0.2
function(x) log(x)
function(x) exp(x)
93002
alpha2
alpha2
alpha2 parameter for zero-n-inflated binomial_2
intern alpha2 parameter for zero-n-inflated binomial_2
-1
FALSE
gaussian
-1 0.2
function(x) log(x)
function(x) exp(x)
Zero and N inflated binomial, type 3
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
zeroinflated
Number of hyperparmeters is 2.
93101
alpha0
alpha0
alpha0 parameter for zero-n-inflated binomial_3
intern alpha0 parameter for zero-n-inflated binomial_3
1
FALSE
loggamma
1 1
function(x) log(x)
function(x) exp(x)
93102
alphaN
alphaN
intern alphaN parameter for zero-n-inflated binomial_3
alphaN parameter for zero-n-inflated binomial_3
1
FALSE
loggamma
1 1
function(x) log(x)
function(x) exp(x)
Zero inflated Beta-Binomial, type 2
FALSE
FALSE
default logit loga cauchit probit cloglog ccloglog loglog robit sn
zeroinflated
Number of hyperparmeters is 2.
94001
log alpha
a
zero-probability parameter for zero-inflated betabinomial_2
intern zero-probability parameter for zero-inflated betabinomial_2
0.693147180559945
FALSE
gaussian
0.693147180559945 1
function(x) log(x)
function(x) exp(x)
94002
beta
b
overdispersion parameter for zero-inflated betabinomial_2
intern overdispersion parameter for zero-inflated betabinomial_2
0
FALSE
gaussian
0 1
function(x) log(x)
function(x) exp(x)
Zero inflated negBinomial, type 0
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 2.
95001
log size
size
size for nbinomial_0 zero-inflated observations
log size for nbinomial_0 zero-inflated observations
2.30258509299405
FALSE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
95002
logit probability
prob
zero-probability parameter for zero-inflated nbinomial_0
intern zero-probability parameter for zero-inflated nbinomial_0
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero inflated negBinomial, type 1
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 2.
96001
log size
size
size for nbinomial_1 zero-inflated observations
log size for nbinomial_1 zero-inflated observations
2.30258509299405
FALSE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
96002
logit probability
prob
zero-probability parameter for zero-inflated nbinomial_1
intern zero-probability parameter for zero-inflated nbinomial_1
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero inflated negBinomial, type 1, strata 2
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 11.
97001
log size
size
size for zero-inflated nbinomial_1_strata2
log size for zero-inflated nbinomial_1_strata2
2.30258509299405
FALSE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
97002
logit probability 1
prob1
zero-probability1 for zero-inflated nbinomial_1_strata2
intern zero-probability1 for zero-inflated nbinomial_1_strata2
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97003
logit probability 2
prob2
zero-probability2 for zero-inflated nbinomial_1_strata2
intern zero-probability2 for zero-inflated nbinomial_1_strata2
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97004
logit probability 3
prob3
zero-probability3 for zero-inflated nbinomial_1_strata2
intern zero-probability3 for zero-inflated nbinomial_1_strata2
-1
TRUE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97005
logit probability 4
prob4
zero-probability4 for zero-inflated nbinomial_1_strata2
intern zero-probability4 for zero-inflated nbinomial_1_strata2
-1
TRUE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97006
logit probability 5
prob5
zero-probability5 for zero-inflated nbinomial_1_strata2
intern zero-probability5 for zero-inflated nbinomial_1_strata2
-1
TRUE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97007
logit probability 6
prob6
zero-probability6 for zero-inflated nbinomial_1_strata2
intern zero-probability6 for zero-inflated nbinomial_1_strata2
-1
TRUE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97008
logit probability 7
prob7
zero-probability7 for zero-inflated nbinomial_1_strata2
intern zero-probability7 for zero-inflated nbinomial_1_strata2
-1
TRUE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97009
logit probability 8
prob8
zero-probability8 for zero-inflated nbinomial_1_strata2
intern zero-probability8 for zero-inflated nbinomial_1_strata2
-1
TRUE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97010
logit probability 9
prob9
zero-probability9 for zero-inflated nbinomial_1_strata2
intern zero-probability9 for zero-inflated nbinomial_1_strata2
-1
TRUE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
97011
logit probability 10
prob10
zero-probability10 for zero-inflated nbinomial_1_strata2
intern zero-probability10 for zero-inflated nbinomial_1_strata2
-1
TRUE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
Zero inflated negBinomial, type 1, strata 3
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 11.
98001
logit probability
prob
zero-probability for zero-inflated nbinomial_1_strata3
intern zero-probability for zero-inflated nbinomial_1_strata3
-1
FALSE
gaussian
-1 0.2
function(x) log(x / (1 - x))
function(x) exp(x) / (1 + exp(x))
98002
log size 1
size1
size1 for zero-inflated nbinomial_1_strata3
log_size1 for zero-inflated nbinomial_1_strata3
2.30258509299405
FALSE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98003
log size 2
size2
size2 for zero-inflated nbinomial_1_strata3
log_size2 for zero-inflated nbinomial_1_strata3
2.30258509299405
FALSE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98004
log size 3
size3
size3 for zero-inflated nbinomial_1_strata3
log_size3 for zero-inflated nbinomial_1_strata3
2.30258509299405
TRUE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98005
log size 4
size4
size4 for zero-inflated nbinomial_1_strata3
log_size4 for zero-inflated nbinomial_1_strata3
2.30258509299405
TRUE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98006
log size 5
size5
size5 for zero-inflated nbinomial_1_strata3
log_size5 for zero-inflated nbinomial_1_strata3
2.30258509299405
TRUE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98007
log size 6
size6
size6 for zero-inflated nbinomial_1_strata3
log_size6 for zero-inflated nbinomial_1_strata3
2.30258509299405
TRUE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98008
log size 7
size7
size7 for zero-inflated nbinomial_1_strata3
log_size7 for zero-inflated nbinomial_1_strata3
2.30258509299405
TRUE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98009
log size 8
size8
size8 for zero-inflated nbinomial_1_strata3
log_size8 for zero-inflated nbinomial_1_strata3
2.30258509299405
TRUE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98010
log size 9
size9
size9 for zero-inflated nbinomial_1_strata3
log_size9 for zero-inflated nbinomial_1_strata3
2.30258509299405
TRUE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
98011
log size 10
size10
size10 for zero-inflated nbinomial_1_strata3
log_size10 for zero-inflated nbinomial_1_strata3
2.30258509299405
TRUE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
Zero inflated negBinomial, type 2
FALSE
FALSE
default log
zeroinflated
Number of hyperparmeters is 2.
99001
log size
size
size for nbinomial zero-inflated observations
log size for nbinomial zero-inflated observations
2.30258509299405
FALSE
pc.mgamma
7
function(x) log(x)
function(x) exp(x)
99002
log alpha
a
parameter alpha for zero-inflated nbinomial2
parameter alpha.intern for zero-inflated nbinomial2
0.693147180559945
FALSE
gaussian
2 1
function(x) log(x)
function(x) exp(x)
Student-t likelihood
FALSE
FALSE
default identity
student-t
Number of hyperparmeters is 2.
100001
log precision
prec
precision for the student-t observations
log precision for the student-t observations
0
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
100002
log degrees of freedom
dof
degrees of freedom for student-t
dof_intern for student-t
5
FALSE
pc.dof
15 0.5
function(x) log(x - 2)
function(x) 2 + exp(x)
A stratified version of the Student-t likelihood
FALSE
FALSE
default identity
tstrata
Number of hyperparmeters is 11.
101001
log degrees of freedom
dof
dof_intern for tstrata
degrees of freedom for tstrata
4
FALSE
pc.dof
15 0.5
function(x) log(x - 5)
function(x) 5 + exp(x)
101002
log precision1
prec1
Prec for tstrata strata
Log prec for tstrata strata
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101003
log precision2
prec2
Prec for tstrata strata[2]
Log prec for tstrata strata[2]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101004
log precision3
prec3
Prec for tstrata strata[3]
Log prec for tstrata strata[3]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101005
log precision4
prec4
Prec for tstrata strata[4]
Log prec for tstrata strata[4]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101006
log precision5
prec5
Prec for tstrata strata[5]
Log prec for tstrata strata[5]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101007
log precision6
prec6
Prec for tstrata strata[6]
Log prec for tstrata strata[6]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101008
log precision7
prec7
Prec for tstrata strata[7]
Log prec for tstrata strata[7]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101009
log precision8
prec8
Prec for tstrata strata[8]
Log prec for tstrata strata[8]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101010
log precision9
prec9
Prec for tstrata strata[9]
Log prec for tstrata strata[9]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
101011
log precision10
prec10
Prec for tstrata strata[10]
Log prec for tstrata strata[10]
2
FALSE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
Binomial-Poisson mixture
FALSE
TRUE
default logit loga probit
nmix
Number of hyperparmeters is 15.
101101
beta1
beta1
beta[1] for NMix observations
beta[1] for NMix observations
2.30258509299405
FALSE
normal
0 0.5
function(x) x
function(x) x
101102
beta2
beta2
beta[2] for NMix observations
beta[2] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101103
beta3
beta3
beta[3] for NMix observations
beta[3] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101104
beta4
beta4
beta[4] for NMix observations
beta[4] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101105
beta5
beta5
beta[5] for NMix observations
beta[5] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101106
beta6
beta6
beta[6] for NMix observations
beta[6] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101107
beta7
beta7
beta[7] for NMix observations
beta[7] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101108
beta8
beta8
beta[8] for NMix observations
beta[8] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101109
beta9
beta9
beta[9] for NMix observations
beta[9] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101110
beta10
beta10
beta[10] for NMix observations
beta[10] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101111
beta11
beta11
beta[11] for NMix observations
beta[11] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101112
beta12
beta12
beta[12] for NMix observations
beta[12] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101113
beta13
beta13
beta[13] for NMix observations
beta[13] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101114
beta14
beta14
beta[14] for NMix observations
beta[14] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101115
beta15
beta15
beta[15] for NMix observations
beta[15] for NMix observations
0
FALSE
normal
0 1
function(x) x
function(x) x
NegBinomial-Poisson mixture
FALSE
TRUE
default logit loga probit
nmixnb
Number of hyperparmeters is 16.
101121
beta1
beta1
beta[1] for NMixNB observations
beta[1] for NMixNB observations
2.30258509299405
FALSE
normal
0 0.5
function(x) x
function(x) x
101122
beta2
beta2
beta[2] for NMixNB observations
beta[2] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101123
beta3
beta3
beta[3] for NMixNB observations
beta[3] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101124
beta4
beta4
beta[4] for NMixNB observations
beta[4] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101125
beta5
beta5
beta[5] for NMixNB observations
beta[5] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101126
beta6
beta6
beta[6] for NMixNB observations
beta[6] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101127
beta7
beta7
beta[7] for NMixNB observations
beta[7] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101128
beta8
beta8
beta[8] for NMixNB observations
beta[8] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101129
beta9
beta9
beta[9] for NMixNB observations
beta[9] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101130
beta10
beta10
beta[10] for NMixNB observations
beta[10] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101131
beta11
beta11
beta[11] for NMixNB observations
beta[11] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101132
beta12
beta12
beta[12] for NMixNB observations
beta[12] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101133
beta13
beta13
beta[13] for NMixNB observations
beta[13] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101134
beta14
beta14
beta[14] for NMixNB observations
beta[14] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101135
beta15
beta15
beta[15] for NMixNB observations
beta[15] for NMixNB observations
0
FALSE
normal
0 1
function(x) x
function(x) x
101136
overdispersion
overdispersion
overdispersion for NMixNB observations
log_overdispersion for NMixNB observations
0
FALSE
pc.gamma
7
function(x) log(x)
function(x) exp(x)
Generalized Pareto likelihood
FALSE
TRUE
default quantile
genPareto
Number of hyperparmeters is 1.
101201
tail
xi
Tail parameter for the gp observations
Intern tail parameter for the gp observations
-4
FALSE
pc.gevtail
7 0 0.5
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) log(-(interval[1] - x) / (interval[2] - x))
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) interval[1] + (interval[2] - interval[1]) * exp(x) / (1.0 + exp(x))
Exteneded Generalized Pareto likelihood
experimental
FALSE
FALSE
default quantile
egp
Number of hyperparmeters is 2.
101211
tail
xi
Tail parameter for egp observations
Intern tail parameter for egp observations
0
FALSE
pc.egptail
5 -0.5 0.5
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) log(-(interval[1] - x) / (interval[2] - x))
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) interval[1] + (interval[2] - interval[1]) * exp(x) / (1.0 + exp(x))
101212
shape
kappa
Shape parameter for the egp observations
Intern shape parameter for the egp observations
0
FALSE
loggamma
100 100
function(x) log(x)
function(x) exp(x)
Discrete generalized Pareto likelihood
FALSE
TRUE
default quantile
dgp
Number of hyperparmeters is 1.
101301
tail
xi
Tail parameter for the dgp observations
Intern tail parameter for the dgp observations
2
FALSE
pc.gevtail
7 0 0.5
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) log(-(interval[1] - x) / (interval[2] - x))
function(x, interval = c(REPLACE.ME.low, REPLACE.ME.high)) interval[1] + (interval[2] - interval[1]) * exp(x) / (1.0 + exp(x))
Likelihood for the log-periodogram
FALSE
FALSE
default identity
NA
Number of hyperparmeters is 0.
Tweedie distribution
FALSE
FALSE
default log
tweedie
Number of hyperparmeters is 2.
102101
p
p
p parameter for Tweedie
p_intern parameter for Tweedie
0
FALSE
normal
0 100
function(x, interval = c(1.0, 2.0)) log(-(interval[1] - x) / (interval[2] - x))
function(x, interval = c(1.0, 2.0)) interval[1] + (interval[2] - interval[1]) * exp(x) / (1.0 + exp(x))
102201
dispersion
phi
Dispersion parameter for Tweedie
Log dispersion parameter for Tweedie
-4
FALSE
loggamma
100 100
function(x) log(x)
function(x) exp(x)
fmri distribution (special nc-chi)
FALSE
FALSE
default log
fmri
Number of hyperparmeters is 2.
103101
precision
prec
Precision for fmri
Log precision for fmri
0
FALSE
loggamma
10 10
function(x) log(x)
function(x) exp(x)
103202
dof
df
NOT IN USE
NOT IN USE
4
TRUE
normal
0 1
function(x) x
function(x) x
fmri distribution (special nc-chi)
TRUE
FALSE
default log
fmri
Number of hyperparmeters is 2.
104101
precision
prec
Precision for fmrisurv
Log precision for fmrisurv
0
FALSE
loggamma
10 10
function(x) log(x)
function(x) exp(x)
104201
dof
df
NOT IN USE
NOT IN USE
4
TRUE
normal
0 1
function(x) x
function(x) x
gompertz distribution
FALSE
FALSE
default log neglog
gompertz
Number of hyperparmeters is 1.
105101
shape
alpha
alpha_intern for Gompertz
alpha parameter for Gompertz
-1
FALSE
normal
0 1
function(x, sc = 0.1) log(x) / sc
function(x, sc = 0.1) exp(sc * x)
gompertz distribution
TRUE
FALSE
default log neglog
gompertz
Number of hyperparmeters is 11.
106101
shape
alpha
alpha_intern for Gompertz-surv
alpha parameter for Gompertz-surv
-10
FALSE
normal
0 1
function(x, sc = 0.1) log(x) / sc
function(x, sc = 0.1) exp(sc * x)
106102
beta1
beta1
beta1 for Gompertz-Cure
beta1 for Gompertz-Cure
-5
FALSE
normal
-4 100
function(x) x
function(x) x
106103
beta2
beta2
beta2 for Gompertz-Cure
beta2 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
106104
beta3
beta3
beta3 for Gompertz-Cure
beta3 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
106105
beta4
beta4
beta4 for Gompertz-Cure
beta4 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
106106
beta5
beta5
beta5 for Gompertz-Cure
beta5 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
106107
beta6
beta6
beta6 for Gompertz-Cure
beta6 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
106108
beta7
beta7
beta7 for Gompertz-Cure
beta7 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
106109
beta8
beta8
beta8 for Gompertz-Cure
beta8 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
106110
beta9
beta9
beta9 for Gompertz-Cure
beta9 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
106111
beta10
beta10
beta10 for Gompertz-Cure
beta10 for Gompertz-Cure
0
FALSE
normal
0 100
function(x) x
function(x) x
destructive gompertz (survival) distribution
TRUE
TRUE
FALSE
default log neglog
dgompertz
Number of hyperparmeters is 1.
108101
shape
alpha
alpha_intern for dGompertz
alpha parameter for dGompertz
-1
FALSE
normal
0 10
function(x) x
function(x) x
von Mises circular distribution
TRUE
FALSE
FALSE
default circular tan tan.pi identity
vm
Number of hyperparmeters is 1.
109101
precision
prec
prec_intern for vm
precision parameter for vm
2
FALSE
loggamma
1 0.01
function(x) log(x)
function(x) exp(x)
Valid models in this section are:
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 4
Number of parameters in the prior = 7
Number of parameters in the prior = 11
Number of parameters in the prior = 16
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 0
Number of parameters in the prior = 0
Number of parameters in the prior = 0
Number of parameters in the prior = -1
Number of parameters in the prior = 1
Number of parameters in the prior = 1
Number of parameters in the prior = 1
Number of parameters in the prior = 0
Number of parameters in the prior = 0
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 2
Number of parameters in the prior = 4
Number of parameters in the prior = 3
Number of parameters in the prior = 2
Number of parameters in the prior = 1
Number of parameters in the prior = 1
Number of parameters in the prior = 1
Number of parameters in the prior = 1
Number of parameters in the prior = 3
Number of parameters in the prior = 3
Number of parameters in the prior = 2
Number of parameters in the prior = 0
Number of parameters in the prior = 0
Number of parameters in the prior = 0
Number of parameters in the prior = 301
Number of parameters in the prior = -1
Number of parameters in the prior = -1
Number of parameters in the prior = 0
Valid models in this section are:
(experimental)
FALSE
FALSE
FALSE
1
NULL
NULL
FALSE
FALSE
NA
Number of hyperparmeters is 1.
102001
log precision
prec
NOT IN USE
NOT IN USE
0
TRUE
loggamma
1 5e-05
function(x) log(x)
function(x) exp(x)
Valid models in this section are:
lp.scale
Number of hyperparmeters is 100.
103001
beta1
b1
beta[1] for lp_scale
beta[1] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103002
beta2
b2
beta[2] for lp_scale
beta[2] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103003
beta3
b3
beta[3] for lp_scale
beta[3] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103004
beta4
b4
beta[4] for lp_scale
beta[4] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103005
beta5
b5
beta[5] for lp_scale
beta[5] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103006
beta6
b6
beta[6] for lp_scale
beta[6] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103007
beta7
b7
beta[7] for lp_scale
beta[7] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103008
beta8
b8
beta[8] for lp_scale
beta[8] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103009
beta9
b9
beta[9] for lp_scale
beta[9] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103010
beta10
b10
beta[10] for lp_scale
beta[10] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103011
beta11
b11
beta[11] for lp_scale
beta[11] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103012
beta12
b12
beta[12] for lp_scale
beta[12] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103013
beta13
b13
beta[13] for lp_scale
beta[13] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103014
beta14
b14
beta[14] for lp_scale
beta[14] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103015
beta15
b15
beta[15] for lp_scale
beta[15] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103016
beta16
b16
beta[16] for lp_scale
beta[16] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103017
beta17
b17
beta[17] for lp_scale
beta[17] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103018
beta18
b18
beta[18] for lp_scale
beta[18] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103019
beta19
b19
beta[19] for lp_scale
beta[19] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103020
beta20
b20
beta[20] for lp_scale
beta[20] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103021
beta21
b21
beta[21] for lp_scale
beta[21] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103022
beta22
b22
beta[22] for lp_scale
beta[22] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103023
beta23
b23
beta[23] for lp_scale
beta[23] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103024
beta24
b24
beta[24] for lp_scale
beta[24] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103025
beta25
b25
beta[25] for lp_scale
beta[25] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103026
beta26
b26
beta[26] for lp_scale
beta[26] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103027
beta27
b27
beta[27] for lp_scale
beta[27] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103028
beta28
b28
beta[28] for lp_scale
beta[28] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103029
beta29
b29
beta[29] for lp_scale
beta[29] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103030
beta30
b30
beta[30] for lp_scale
beta[30] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103031
beta31
b31
beta[31] for lp_scale
beta[31] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103032
beta32
b32
beta[32] for lp_scale
beta[32] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103033
beta33
b33
beta[33] for lp_scale
beta[33] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103034
beta34
b34
beta[34] for lp_scale
beta[34] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103035
beta35
b35
beta[35] for lp_scale
beta[35] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103036
beta36
b36
beta[36] for lp_scale
beta[36] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103037
beta37
b37
beta[37] for lp_scale
beta[37] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103038
beta38
b38
beta[38] for lp_scale
beta[38] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103039
beta39
b39
beta[39] for lp_scale
beta[39] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103040
beta40
b40
beta[40] for lp_scale
beta[40] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103041
beta41
b41
beta[41] for lp_scale
beta[41] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103042
beta42
b42
beta[42] for lp_scale
beta[42] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103043
beta43
b43
beta[43] for lp_scale
beta[43] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103044
beta44
b44
beta[44] for lp_scale
beta[44] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103045
beta45
b45
beta[45] for lp_scale
beta[45] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103046
beta46
b46
beta[46] for lp_scale
beta[46] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103047
beta47
b47
beta[47] for lp_scale
beta[47] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103048
beta48
b48
beta[48] for lp_scale
beta[48] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103049
beta49
b49
beta[49] for lp_scale
beta[49] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103050
beta50
b50
beta[50] for lp_scale
beta[50] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103051
beta51
b51
beta[51] for lp_scale
beta[51] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103052
beta52
b52
beta[52] for lp_scale
beta[52] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103053
beta53
b53
beta[53] for lp_scale
beta[53] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103054
beta54
b54
beta[54] for lp_scale
beta[54] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103055
beta55
b55
beta[55] for lp_scale
beta[55] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103056
beta56
b56
beta[56] for lp_scale
beta[56] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103057
beta57
b57
beta[57] for lp_scale
beta[57] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103058
beta58
b58
beta[58] for lp_scale
beta[58] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103059
beta59
b59
beta[59] for lp_scale
beta[59] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103060
beta60
b60
beta[60] for lp_scale
beta[60] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103061
beta61
b61
beta[61] for lp_scale
beta[61] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103062
beta62
b62
beta[62] for lp_scale
beta[62] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103063
beta63
b63
beta[63] for lp_scale
beta[63] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103064
beta64
b64
beta[64] for lp_scale
beta[64] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103065
beta65
b65
beta[65] for lp_scale
beta[65] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103066
beta66
b66
beta[66] for lp_scale
beta[66] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103067
beta67
b67
beta[67] for lp_scale
beta[67] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103068
beta68
b68
beta[68] for lp_scale
beta[68] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103069
beta69
b69
beta[69] for lp_scale
beta[69] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103070
beta70
b70
beta[70] for lp_scale
beta[70] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103071
beta71
b71
beta[71] for lp_scale
beta[71] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103072
beta72
b72
beta[72] for lp_scale
beta[72] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103073
beta73
b73
beta[73] for lp_scale
beta[73] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103074
beta74
b74
beta[74] for lp_scale
beta[74] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103075
beta75
b75
beta[75] for lp_scale
beta[75] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103076
beta76
b76
beta[76] for lp_scale
beta[76] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103077
beta77
b77
beta[77] for lp_scale
beta[77] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103078
beta78
b78
beta[78] for lp_scale
beta[78] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103079
beta79
b79
beta[79] for lp_scale
beta[79] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103080
beta80
b80
beta[80] for lp_scale
beta[80] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103081
beta81
b81
beta[81] for lp_scale
beta[81] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103082
beta82
b82
beta[82] for lp_scale
beta[82] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103083
beta83
b83
beta[83] for lp_scale
beta[83] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103084
beta84
b84
beta[84] for lp_scale
beta[84] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103085
beta85
b85
beta[85] for lp_scale
beta[85] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103086
beta86
b86
beta[86] for lp_scale
beta[86] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103087
beta87
b87
beta[87] for lp_scale
beta[87] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103088
beta88
b88
beta[88] for lp_scale
beta[88] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103089
beta89
b89
beta[89] for lp_scale
beta[89] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103090
beta90
b90
beta[90] for lp_scale
beta[90] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103091
beta91
b91
beta[91] for lp_scale
beta[91] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103092
beta92
b92
beta[92] for lp_scale
beta[92] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103093
beta93
b93
beta[93] for lp_scale
beta[93] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103094
beta94
b94
beta[94] for lp_scale
beta[94] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103095
beta95
b95
beta[95] for lp_scale
beta[95] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103096
beta96
b96
beta[96] for lp_scale
beta[96] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103097
beta97
b97
beta[97] for lp_scale
beta[97] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103098
beta98
b98
beta[98] for lp_scale
beta[98] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103099
beta99
b99
beta[99] for lp_scale
beta[99] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
103100
beta100
b100
beta[100] for lp_scale
beta[100] for lp_scale
1
FALSE
normal
1 10
function(x) x
function(x) x
## How to set hyperparameters to pass as the argument 'hyper'. This ## format is compatible with the old style (using 'initial', 'fixed', ## 'prior', 'param'), but the new style using 'hyper' takes precedence ## over the old style. The two styles can also be mixed. The old style ## might be removed from the code in the future... ## Only a subset need to be given hyper <- list(theta = list(initial = 2)) ## The `name' can be used instead of 'theta', or 'theta1', 'theta2',... hyper <- list(precision = list(initial = 2)) hyper <- list(precision = list(prior = "flat", param = numeric(0))) hyper <- list(theta2 = list(initial = 3), theta1 = list(prior = "gaussian")) ## The 'short.name' can be used instead of 'name' hyper <- list(rho = list(param = c(0, 1)))
## How to set hyperparameters to pass as the argument 'hyper'. This ## format is compatible with the old style (using 'initial', 'fixed', ## 'prior', 'param'), but the new style using 'hyper' takes precedence ## over the old style. The two styles can also be mixed. The old style ## might be removed from the code in the future... ## Only a subset need to be given hyper <- list(theta = list(initial = 2)) ## The `name' can be used instead of 'theta', or 'theta1', 'theta2',... hyper <- list(precision = list(initial = 2)) hyper <- list(precision = list(prior = "flat", param = numeric(0))) hyper <- list(theta2 = list(initial = 3), theta1 = list(prior = "gaussian")) ## The 'short.name' can be used instead of 'name' hyper <- list(rho = list(param = c(0, 1)))
For use with 'nmix'
and 'nmixnb'
models. This function takes
the information contained in an object returned by inla()
and uses
the contents to create fitted lambda values using the linear predictor for
log(lambda), the input covariate values, and samples from the posteriors of
the model hyperparameters. Fitted values from the linear predictor are
exponentiated, by default, before being returned.
inla.nmix.lambda.fitted( result, sample.size = 1000, return.posteriors = FALSE, scale = "exp" )
inla.nmix.lambda.fitted( result, sample.size = 1000, return.posteriors = FALSE, scale = "exp" )
result |
The output object from a call to |
sample.size |
The size of the sample from the posteriors of the model hyperparameters. This sample size ends up being the size of the estimated posterior for a fitted lambda value. Default is 1000. Larger values are recommended. |
return.posteriors |
A logical value for whether or not to return the
full estimated posteriors for each fitted value ( |
scale |
A character string, where the default string, |
fitted.summary |
A data frame with summaries of estimated
posteriors of fitted lambda values. The number of rows equals the number of
rows in the data used to create the |
fitted.posteriors |
A data frame containing samples that comprise the
full estimated posteriors of fitted values. The number of rows equals the
number of rows in the data used to create the |
This function is experimental.
Tim Meehan tmeehan@audubon.org
See documentation for families "nmix" and "nmixmb":
inla.doc("nmix")
## an example analysis of an N-mixture model using simulated data ## set parameters n <- 75 # number of study sites nrep.max <- 5 # number of surveys per site b0 <- 0.5 # lambda intercept, expected abundance b1 <- 2.0 # effect of x1 on lambda a0 <- 1.0 # p intercept, detection probability a2 <- 0.5 # effect of x2 on p size <- 3.0 # size of theta overdispersion <- 1 / size # for negative binomial distribution ## make empty vectors and matrix x1 <- c(); x2 <- c() lambdas <- c(); Ns <- c() y <- matrix(NA, n, nrep.max) ## fill vectors and matrix for(i in 1:n) { x1.i <- runif(1) - 0.5 lambda <- exp(b0 + b1 * x1.i) N <- rnbinom(1, mu = lambda, size = size) x2.i <- runif(1) - 0.5 eta <- a0 + a2 * x2.i p <- exp(eta) / (exp(eta) + 1) nr <- sample(1:nrep.max, 1) y[i, 1:nr] <- rbinom(nr, size = N, prob = p) x1 <- c(x1, x1.i); x2 <- c(x2, x2.i) lambdas <- c(lambdas, lambda); Ns <- c(Ns, N) } ## bundle counts, lambda intercept, and lambda covariates Y <- inla.mdata(y, 1, x1) ## run inla and summarize output result <- inla(Y ~ 1 + x2, data = list(Y=Y, x2=x2), family = "nmixnb", control.fixed = list(mean = 0, mean.intercept = 0, prec = 0.01, prec.intercept = 0.01), control.family = list(hyper = list(theta1 = list(param = c(0, 0.01)), theta2 = list(param = c(0, 0.01)), theta3 = list(prior = "flat", param = numeric()))), control.compute=list(config = TRUE)) # important argument summary(result) ## get and evaluate fitted values lam.fits <- inla.nmix.lambda.fitted(result, 5000)$fitted.summary plot(lam.fits$median.lambda, lambdas) round(sum(lam.fits$median.lambda), 0); sum(Ns)
## an example analysis of an N-mixture model using simulated data ## set parameters n <- 75 # number of study sites nrep.max <- 5 # number of surveys per site b0 <- 0.5 # lambda intercept, expected abundance b1 <- 2.0 # effect of x1 on lambda a0 <- 1.0 # p intercept, detection probability a2 <- 0.5 # effect of x2 on p size <- 3.0 # size of theta overdispersion <- 1 / size # for negative binomial distribution ## make empty vectors and matrix x1 <- c(); x2 <- c() lambdas <- c(); Ns <- c() y <- matrix(NA, n, nrep.max) ## fill vectors and matrix for(i in 1:n) { x1.i <- runif(1) - 0.5 lambda <- exp(b0 + b1 * x1.i) N <- rnbinom(1, mu = lambda, size = size) x2.i <- runif(1) - 0.5 eta <- a0 + a2 * x2.i p <- exp(eta) / (exp(eta) + 1) nr <- sample(1:nrep.max, 1) y[i, 1:nr] <- rbinom(nr, size = N, prob = p) x1 <- c(x1, x1.i); x2 <- c(x2, x2.i) lambdas <- c(lambdas, lambda); Ns <- c(Ns, N) } ## bundle counts, lambda intercept, and lambda covariates Y <- inla.mdata(y, 1, x1) ## run inla and summarize output result <- inla(Y ~ 1 + x2, data = list(Y=Y, x2=x2), family = "nmixnb", control.fixed = list(mean = 0, mean.intercept = 0, prec = 0.01, prec.intercept = 0.01), control.family = list(hyper = list(theta1 = list(param = c(0, 0.01)), theta2 = list(param = c(0, 0.01)), theta3 = list(prior = "flat", param = numeric()))), control.compute=list(config = TRUE)) # important argument summary(result) ## get and evaluate fitted values lam.fits <- inla.nmix.lambda.fitted(result, 5000)$fitted.summary plot(lam.fits$median.lambda, lambdas) round(sum(lam.fits$median.lambda), 0); sum(Ns)
Use
fmesher::fm_nonconvex_hull_inla()
or
fmesher::fm_nonconvex_hull()
instead.
Constructs a nonconvex boundary for a point set using morphological operations.
inla.nonconvex.hull( points, convex = -0.15, concave = convex, resolution = 40, eps = NULL, crs = NULL ) inla.nonconvex.hull.basic( points, convex = -0.15, resolution = 40, eps = NULL, crs = NULL )
inla.nonconvex.hull( points, convex = -0.15, concave = convex, resolution = 40, eps = NULL, crs = NULL ) inla.nonconvex.hull.basic( points, convex = -0.15, resolution = 40, eps = NULL, crs = NULL )
points |
2D point coordinates (2-column matrix). Can alternatively be
a |
convex |
The desired extension radius. Also determines the smallest allowed convex curvature radius. Negative values are interpreted as fractions of the approximate initial set diameter. |
concave |
The desired minimal concave curvature radius. Default is
|
resolution |
The internal computation resolution. A warning will be issued when this needs to be increased for higher accuracy, with the required resolution stated. |
eps |
The polygonal curve simplification tolerance used for simplifying
the resulting boundary curve. See |
crs |
An optional |
Morphological dilation by convex
, followed by closing by
concave
, with minimum concave curvature radius concave
. If
the dilated set has no gaps of width between
and , then the minimum convex curvature radius is
convex
. Special case concave=0
delegates to
inla.nonconvex.hull.basic
The implementation is based on the identity
where all operations are with respect to disks with the specified radii.
An inla.mesh.segment()
object.
inla.nonconvex.hull.basic()
:
Use
fmesher::fm_nonconvex_hull_inla_basic()
instead.
Requires nndistF
from the splancs
package.
Finn Lindgren finn.lindgren@gmail.com
if (require(splancs)) { loc <- matrix(runif(20), 10, 2) boundary <- inla.nonconvex.hull(loc, convex = 0.2) lines(boundary, add = FALSE) points(loc) }
if (require(splancs)) { loc <- matrix(runif(20), 10, 2) boundary <- inla.nonconvex.hull(loc, convex = 0.2) lines(boundary, add = FALSE) points(loc) }
Set and get global options for INLA
inla.getOption( option = c("inla.call", "inla.arg", "fmesher.call", "fmesher.arg", "num.threads", "smtp", "safe", "keep", "verbose", "save.memory", "internal.opt", "working.directory", "silent", "debug", "show.warning.graph.file", "scale.model.default", "short.summary", "inla.timeout", "fmesher.timeout", "inla.mode", "malloc.lib", "fmesher.evolution", "fmesher.evolution.warn", "fmesher.evolution.verbosity", "INLAjoint.features", "numa") ) inla.setOption(...)
inla.getOption( option = c("inla.call", "inla.arg", "fmesher.call", "fmesher.arg", "num.threads", "smtp", "safe", "keep", "verbose", "save.memory", "internal.opt", "working.directory", "silent", "debug", "show.warning.graph.file", "scale.model.default", "short.summary", "inla.timeout", "fmesher.timeout", "inla.mode", "malloc.lib", "fmesher.evolution", "fmesher.evolution.warn", "fmesher.evolution.verbosity", "INLAjoint.features", "numa") ) inla.setOption(...)
option |
The option to get. If
|
... |
Option and value, like |
Havard Rue hrue@r-inla.org
## set number of threads inla.setOption("num.threads", "4:1") ## alternative format inla.setOption(num.threads="4:1") ## check it inla.getOption("num.threads")
## set number of threads inla.setOption("num.threads", "4:1") ## alternative format inla.setOption(num.threads="4:1") ## check it inla.getOption("num.threads")
Wrapper for the sp::over()
method to find triangle centroids
or vertices inside sp
polygon objects.
since 23.06.06 in favour of
inlabru::fm_contains()
when inlabru
version >= 2.7.0.9011
is installed, and since 23.08.02 in favour of
fmesher::fm_contains()
when fmesher
.
inla.over_sp_mesh(x, y, type = c("centroid", "vertex"), ignore.CRS = FALSE)
inla.over_sp_mesh(x, y, type = c("centroid", "vertex"), ignore.CRS = FALSE)
x |
geometry (typically a |
y |
an |
type |
the query type; either |
ignore.CRS |
logical; whether to ignore the coordinate system information in |
A vector of triangle indices (when type
is 'centroid'
) or
vertex indices (when type
is 'vertex'
)
Haakon Bakka, bakka@r-inla.org, and Finn Lindgren finn.lindgren@gmail.com
if (require("sp", quietly = TRUE)) { # Create a polygon and a mesh obj <- sp::SpatialPolygons( list(sp::Polygons( list(sp::Polygon(rbind( c(0, 0), c(50, 0), c(50, 50), c(0, 50) ))), ID = 1 )), proj4string = fmesher::fm_CRS("longlat_globe") ) mesh <- inla.mesh.create(globe = 2, crs = fmesher::fm_CRS("sphere")) ## 3 vertices found in the polygon inla.over_sp_mesh(obj, mesh, type = "vertex") ## 3 triangles found in the polygon inla.over_sp_mesh(obj, mesh) ## Multiple transformations can lead to slightly different results due to edge cases ## 4 triangles found in the polygon inla.over_sp_mesh( obj, fmesher::fm_transform(mesh, crs = fmesher::fm_crs("mollweide_norm")) ) }
if (require("sp", quietly = TRUE)) { # Create a polygon and a mesh obj <- sp::SpatialPolygons( list(sp::Polygons( list(sp::Polygon(rbind( c(0, 0), c(50, 0), c(50, 50), c(0, 50) ))), ID = 1 )), proj4string = fmesher::fm_CRS("longlat_globe") ) mesh <- inla.mesh.create(globe = 2, crs = fmesher::fm_CRS("sphere")) ## 3 vertices found in the polygon inla.over_sp_mesh(obj, mesh, type = "vertex") ## 3 triangles found in the polygon inla.over_sp_mesh(obj, mesh) ## Multiple transformations can lead to slightly different results due to edge cases ## 4 triangles found in the polygon inla.over_sp_mesh( obj, fmesher::fm_transform(mesh, crs = fmesher::fm_crs("mollweide_norm")) ) }
Control main thread pinning for INLA (experimental)
inla.pin() inla.unpin()
inla.pin() inla.unpin()
inla.pin
set OMP variables for pinning
inla.unpin
unset OMP variables for pinning
No value is returned.
Havard Rue hrue@r-inla.org
inla.pin() inla.unpin()
inla.pin() inla.unpin()
Print the priors used for the hyperparameters
inla.priors.used(result, digits = 6L)
inla.priors.used(result, digits = 6L)
result |
An |
digits |
The |
This function provides a more human-friendly output of
result$all.hyper
of all the priors used for the hyperparameters.
Since not all information about the model is encoded in this object, more
hyperparameters than actually used, may be printed. In particular,
group.theta1
is printed even though the argument group
in
f()
is not used. Similarly for spde-models, but the user should know
that, for example, only the two first ones are actually used. Hopefully,
this issue will be fixed in the future.
Havard Rue hrue@r-inla.org
r = inla(y ~ 1 + x, data = data.frame(y = 1:10, x = rep(1:5, 2))) inla.priors.used(r)
r = inla(y ~ 1 + x, data = data.frame(y = 1:10, x = rep(1:5, 2))) inla.priors.used(r)
Prune the INLA-package by deleting binary files not supported by the running OS
inla.prune(ask = TRUE)
inla.prune(ask = TRUE)
ask |
Logical. If TRUE, then ask for user confirmation before deleting. If FALSE, then delete without user confirmation. |
No value is returned.
Havard Rue hrue@r-inla.org
Control and view a remote inla-queue of submitted jobs
inla.qstat
show job(s) on the server, inla.qget
fetch the
results (and by default remove the files on the server), inla.qdel
removes a job on the server and inla.qnuke
remove all jobs on the
server. inla.qlog
fetches the logfile only.
The recommended procedure is to use r=inla(..., inla.call="submit")
and then do r=inla.qget(r)
at a later stage. If the job is not
finished, then r
will not be overwritten and this step can be
repeated. The reason for this procedure, is that some information usually
stored in the result object does not go through the remote server, hence
have to be appended to the results that are retrieved from the server. Hence
doing r=inla(..., inla.call="submit")
and then later retrive it using
r=inla.qget(1)
, say, then r
does not contain all the usual
information. All the main results are there, but administrative information
which is required to call inla.hyperpar
or inla.rerun
are not
there.
## S3 method for class 'inla.q' summary(object, ...) ## S3 method for class 'inla.q' print(x, ...) inla.qget(id, remove = TRUE) inla.qdel(id) inla.qstat(id) inla.qlog(id) inla.qnuke()
## S3 method for class 'inla.q' summary(object, ...) ## S3 method for class 'inla.q' print(x, ...) inla.qget(id, remove = TRUE) inla.qdel(id) inla.qstat(id) inla.qlog(id) inla.qnuke()
object |
An |
... |
other arguments. |
x |
An |
id |
The job-id which is the output from |
remove |
Logical If FALSE, leave the job on the server after retrival, otherwise remove it (default). |
inla.qstat
returns an inla.q
-object with information
about current jobs.
Havard Rue
## Not run: r = inla(y~1, data = data.frame(y=rnorm(10)), inla.call="submit") inla.qstat() r = inla.qget(r, remove=FALSE) inla.qdel(1) inla.qnuke() ## End(Not run)
## Not run: r = inla(y~1, data = data.frame(y=rnorm(10)), inla.call="submit") inla.qstat() r = inla.qget(r, remove=FALSE) inla.qdel(1) inla.qnuke() ## End(Not run)
Provide the names of all implemented reordering schemes
inla.reorderings()
inla.reorderings()
The names of all available reorderings
Havard Rue hrue@r-inla.org
inla.reorderings()
inla.reorderings()
Rerun inla()
on an inla-object (output from link{inla}
)
inla.rerun(object, plain = FALSE)
inla.rerun(object, plain = FALSE)
object |
An |
plain |
Logical. If |
This function will take the result in object
, and rerun
inla
again. If plain
is FALSE
, start the optimization
from the mode in object
so that we can obtain an improvement the mode
for the hyperparameters. Otherwise, start from the same configuration as
for object
. The returned value is an inla
-object.
r = inla(y ~ 1, data = data.frame(y=1:10)) r = inla.rerun(r)
r = inla(y ~ 1, data = data.frame(y=1:10)) r = inla.rerun(r)
This function generate samples, and functions of those, from an approximated posterior of a fitted model (an inla-object)
The hyperparameters are sampled from the configurations used to do the
numerical integration, hence if you want a higher resolution, you need to to
change the int.stratey
variable and friends. The latent field is
sampled from the Gaussian approximation conditioned on the hyperparameters,
but with a correction for the mean (default), and optional (and by default)
corrected for the estimated skewness.
The log.density report is only correct when there is no constraints. With constraints, it correct the Gaussian part of the sample for the constraints.
After the sample is (optional) skewness corrected, the log.density is is not exact for correcting for constraints, but the error is very small in most cases.
inla.posterior.sample( n = 1L, result, selection = list(), intern = FALSE, use.improved.mean = TRUE, skew.corr = TRUE, add.names = TRUE, seed = 0L, num.threads = NULL, parallel.configs = TRUE, verbose = FALSE ) inla.posterior.sample.eval(fun, samples, return.matrix = TRUE, ...)
inla.posterior.sample( n = 1L, result, selection = list(), intern = FALSE, use.improved.mean = TRUE, skew.corr = TRUE, add.names = TRUE, seed = 0L, num.threads = NULL, parallel.configs = TRUE, verbose = FALSE ) inla.posterior.sample.eval(fun, samples, return.matrix = TRUE, ...)
n |
Number of samples. |
result |
The inla-object, ie the output from an |
selection |
Select what part of the sample to return. By default, the
whole sample is returned. |
intern |
Logical. If |
use.improved.mean |
Logical. If |
skew.corr |
Logical. If |
add.names |
Logical. If |
seed |
See the same argument in |
num.threads |
The number of threads to use in the format 'A:B' defining
the number threads in the outer (A) and inner (B) layer for nested
parallelism. A '0' will be replaced intelligently. |
parallel.configs |
Logical. If |
verbose |
Logical. Run in verbose mode or not. |
fun |
The function to evaluate for each sample. Upon entry, the
variable names defined in the model are defined as the value of the sample.
The list of names are defined in |
samples |
|
return.matrix |
Logical. If |
... |
Additional arguments to |
inla.posterior.sample
returns a list of the samples, where
each sample is a list with names hyperpar
and latent
, and with
their marginal densities in logdens$hyperpar
and
logdens$latent
and the joint density is in logdens$joint
.
inla.posterior.sample.eval
return a list or a matrix of fun
applied to each sample.
Havard Rue hrue@r-inla.org and Cristian Chiuchiolo cristian.chiuchiolo@kaust.edu.sa
r = inla(y ~ 1 ,data = data.frame(y=rnorm(1)), control.compute = list(config=TRUE)) samples = inla.posterior.sample(2,r) ## reproducible results: inla.seed = as.integer(runif(1)*.Machine$integer.max) set.seed(12345) x = inla.posterior.sample(10, r, seed = inla.seed, num.threads="1:1") set.seed(12345) xx = inla.posterior.sample(10, r, seed = inla.seed, num.threads="1.1") all.equal(x, xx) set.seed(1234) n = 25 xx = rnorm(n) yy = rev(xx) z = runif(n) y = rnorm(n) r = inla(y ~ 1 + z + f(xx) + f(yy, copy="xx"), data = data.frame(y, z, xx, yy), control.compute = list(config=TRUE), family = "gaussian") r.samples = inla.posterior.sample(10, r) fun = function(...) { mean(xx) - mean(yy) } f1 = inla.posterior.sample.eval(fun, r.samples) fun = function(...) { c(exp(Intercept), exp(Intercept + z)) } f2 = inla.posterior.sample.eval(fun, r.samples) fun = function(...) { return (theta[1]/(theta[1] + theta[2])) } f3 = inla.posterior.sample.eval(fun, r.samples) ## Predicting nz new observations, and ## comparing the estimated one with the true one set.seed(1234) n = 100 alpha = beta = s = 1 z = rnorm(n) y = alpha + beta * z + rnorm(n, sd = s) r = inla(y ~ 1 + z, data = data.frame(y, z), control.compute = list(config=TRUE), family = "gaussian") r.samples = inla.posterior.sample(10^3, r) ## just return samples of the intercept intercepts = inla.posterior.sample.eval("Intercept", r.samples) nz = 3 znew = rnorm(nz) fun = function(zz = NA) { ## theta[1] is the precision return (Intercept + z * zz + rnorm(length(zz), sd = sqrt(1/theta[1]))) } par(mfrow=c(1, nz)) f1 = inla.posterior.sample.eval(fun, r.samples, zz = znew) for(i in 1:nz) { hist(f1[i, ], n = 100, prob = TRUE) m = alpha + beta * znew[i] xx = seq(m-4*s, m+4*s, by = s/100) lines(xx, dnorm(xx, mean=m, sd = s), lwd=2) } ## ## Be aware that using non-clean variable names might be a little tricky ## n <- 100 X <- matrix(rnorm(n^2), n, 2) x <- X[, 1] xx <- X[, 2] xxx <- x*xx y <- 1 + 2*x + 3*xx + 4*xxx + rnorm(n, sd = 0.01) r <- inla(y ~ X[, 1]*X[, 2], data = list(y = y, X = X), control.compute = list(config = TRUE)) print(round(dig = 4, r$summary.fixed[,"mean"])) sam <- inla.posterior.sample(100, r) sam.extract <- inla.posterior.sample.eval( (function(...) { beta.1 <- get("X[, 1]") beta.2 <- get("X[, 2]") beta.12 <- get("X[, 1]:X[, 2]") return(c(Intercept, beta.1, beta.2, beta.12)) }), sam) print(round(dig = 4, rowMeans(sam.extract))) ## a simpler form can also be used here, and in the examples below sam.extract <- inla.posterior.sample.eval( c("Intercept", "X[, 1]", "X[, 2]", "X[, 1]:X[, 2]"), sam) print(round(dig = 4, rowMeans(sam.extract))) r <- inla(y ~ x + xx + xxx, data = list(y = y, x = x, xx = xx, xxx = xxx), control.compute = list(config = TRUE)) sam <- inla.posterior.sample(100, r) sam.extract <- inla.posterior.sample.eval( (function(...) { return(c(Intercept, x, xx, xxx)) }), sam) print(round(dig = 4, rowMeans(sam.extract))) sam.extract <- inla.posterior.sample.eval(c("Intercept", "x", "xx", "xxx"), sam) print(round(dig = 4, rowMeans(sam.extract))) r <- inla(y ~ x*xx, data = list(y = y, x = x, xx = xx), control.compute = list(config = TRUE)) sam <- inla.posterior.sample(100, r) sam.extract <- inla.posterior.sample.eval( (function(...) { return(c(Intercept, x, xx, get("x:xx"))) }), sam) print(round(dig = 4, rowMeans(sam.extract))) sam.extract <- inla.posterior.sample.eval(c("Intercept", "x", "xx", "x:xx"), sam) print(round(dig = 4, rowMeans(sam.extract)))
r = inla(y ~ 1 ,data = data.frame(y=rnorm(1)), control.compute = list(config=TRUE)) samples = inla.posterior.sample(2,r) ## reproducible results: inla.seed = as.integer(runif(1)*.Machine$integer.max) set.seed(12345) x = inla.posterior.sample(10, r, seed = inla.seed, num.threads="1:1") set.seed(12345) xx = inla.posterior.sample(10, r, seed = inla.seed, num.threads="1.1") all.equal(x, xx) set.seed(1234) n = 25 xx = rnorm(n) yy = rev(xx) z = runif(n) y = rnorm(n) r = inla(y ~ 1 + z + f(xx) + f(yy, copy="xx"), data = data.frame(y, z, xx, yy), control.compute = list(config=TRUE), family = "gaussian") r.samples = inla.posterior.sample(10, r) fun = function(...) { mean(xx) - mean(yy) } f1 = inla.posterior.sample.eval(fun, r.samples) fun = function(...) { c(exp(Intercept), exp(Intercept + z)) } f2 = inla.posterior.sample.eval(fun, r.samples) fun = function(...) { return (theta[1]/(theta[1] + theta[2])) } f3 = inla.posterior.sample.eval(fun, r.samples) ## Predicting nz new observations, and ## comparing the estimated one with the true one set.seed(1234) n = 100 alpha = beta = s = 1 z = rnorm(n) y = alpha + beta * z + rnorm(n, sd = s) r = inla(y ~ 1 + z, data = data.frame(y, z), control.compute = list(config=TRUE), family = "gaussian") r.samples = inla.posterior.sample(10^3, r) ## just return samples of the intercept intercepts = inla.posterior.sample.eval("Intercept", r.samples) nz = 3 znew = rnorm(nz) fun = function(zz = NA) { ## theta[1] is the precision return (Intercept + z * zz + rnorm(length(zz), sd = sqrt(1/theta[1]))) } par(mfrow=c(1, nz)) f1 = inla.posterior.sample.eval(fun, r.samples, zz = znew) for(i in 1:nz) { hist(f1[i, ], n = 100, prob = TRUE) m = alpha + beta * znew[i] xx = seq(m-4*s, m+4*s, by = s/100) lines(xx, dnorm(xx, mean=m, sd = s), lwd=2) } ## ## Be aware that using non-clean variable names might be a little tricky ## n <- 100 X <- matrix(rnorm(n^2), n, 2) x <- X[, 1] xx <- X[, 2] xxx <- x*xx y <- 1 + 2*x + 3*xx + 4*xxx + rnorm(n, sd = 0.01) r <- inla(y ~ X[, 1]*X[, 2], data = list(y = y, X = X), control.compute = list(config = TRUE)) print(round(dig = 4, r$summary.fixed[,"mean"])) sam <- inla.posterior.sample(100, r) sam.extract <- inla.posterior.sample.eval( (function(...) { beta.1 <- get("X[, 1]") beta.2 <- get("X[, 2]") beta.12 <- get("X[, 1]:X[, 2]") return(c(Intercept, beta.1, beta.2, beta.12)) }), sam) print(round(dig = 4, rowMeans(sam.extract))) ## a simpler form can also be used here, and in the examples below sam.extract <- inla.posterior.sample.eval( c("Intercept", "X[, 1]", "X[, 2]", "X[, 1]:X[, 2]"), sam) print(round(dig = 4, rowMeans(sam.extract))) r <- inla(y ~ x + xx + xxx, data = list(y = y, x = x, xx = xx, xxx = xxx), control.compute = list(config = TRUE)) sam <- inla.posterior.sample(100, r) sam.extract <- inla.posterior.sample.eval( (function(...) { return(c(Intercept, x, xx, xxx)) }), sam) print(round(dig = 4, rowMeans(sam.extract))) sam.extract <- inla.posterior.sample.eval(c("Intercept", "x", "xx", "xxx"), sam) print(round(dig = 4, rowMeans(sam.extract))) r <- inla(y ~ x*xx, data = list(y = y, x = x, xx = xx), control.compute = list(config = TRUE)) sam <- inla.posterior.sample(100, r) sam.extract <- inla.posterior.sample.eval( (function(...) { return(c(Intercept, x, xx, get("x:xx"))) }), sam) print(round(dig = 4, rowMeans(sam.extract))) sam.extract <- inla.posterior.sample.eval(c("Intercept", "x", "xx", "x:xx"), sam) print(round(dig = 4, rowMeans(sam.extract)))
Use
fmesher::fm_simplify_helper()
instead.
Attempts to simplify a polygonal curve by joining nearly colinear segments.
Uses a variation of the binary splitting Ramer-Douglas-Peucker algorithm,
with a width eps
ellipse instead of a rectangle, motivated by
prediction ellipse for Brownian bridge.
inla.simplify.curve(loc, idx, eps)
inla.simplify.curve(loc, idx, eps)
loc |
Coordinate matrix. |
idx |
Index vector into |
eps |
Straightness tolerance. |
An index vector into loc
specifying the simplified polygonal
curve.
Finn Lindgren finn.lindgren@gmail.com
theta <- seq(0, 2 * pi, length.out = 1000) loc <- cbind(cos(theta), sin(theta)) idx <- inla.simplify.curve(loc = loc, idx = 1:nrow(loc), eps = 0.01) print(c(nrow(loc), length(idx))) plot(loc, type = "l") lines(loc[idx, ], col = "red")
theta <- seq(0, 2 * pi, length.out = 1000) loc <- cbind(cos(theta), sin(theta)) idx <- inla.simplify.curve(loc = loc, idx = 1:nrow(loc), eps = 0.01) print(c(nrow(loc), length(idx))) plot(loc, type = "l") lines(loc[idx, ], col = "red")
Use
fmesher::fm_CRS()
instead.
Wrapper for CRS(projargs)
(PROJ4) and CRS(wkt)
for sp::Spatial
objects.
This function is a convenience method to workaround PROJ4/PROJ6 differences, and the lack of a crs extraction method for Spatial objects.
inla.sp_get_crs(x)
inla.sp_get_crs(x)
x |
A |
A CRS
object, or NULL if no valid CRS identified
Finn Lindgren finn.lindgren@gmail.com
## Not run: if (require("sp", quietly = TRUE) && interactive()) { s <- sp::SpatialPoints(matrix(1:6, 3, 2), proj4string = fmesher::fm_CRS("sphere")) inla.sp_get_crs(s) } ## End(Not run)
## Not run: if (require("sp", quietly = TRUE) && interactive()) { s <- sp::SpatialPoints(matrix(1:6, 3, 2), proj4string = fmesher::fm_CRS("sphere")) inla.sp_get_crs(s) } ## End(Not run)
Constructs observation/prediction weight matrices for models based on
inla.mesh()
and inla.mesh.1d()
objects.
For a more modular approach, see fmesher::fm_basis()
,
fmesher::fm_row_kron()
, fmesher::fm_block()
, and the inlabru
bru_mapper()
system.
inla.spde.make.A( mesh = NULL, loc = NULL, index = NULL, group = NULL, repl = 1L, n.spde = NULL, n.group = NULL, n.repl = NULL, group.mesh = NULL, weights = NULL, A.loc = NULL, A.group = NULL, group.index = NULL, block = NULL, n.block = NULL, block.rescale = c("none", "count", "weights", "sum"), ... )
inla.spde.make.A( mesh = NULL, loc = NULL, index = NULL, group = NULL, repl = 1L, n.spde = NULL, n.group = NULL, n.repl = NULL, group.mesh = NULL, weights = NULL, A.loc = NULL, A.group = NULL, group.index = NULL, block = NULL, n.block = NULL, block.rescale = c("none", "count", "weights", "sum"), ... )
mesh |
An |
loc |
Observation/prediction coordinates. |
index |
For each observation/prediction value, an index into
|
group |
For each observation/prediction value, an index into the group model. |
repl |
For each observation/prediction value, the replicate index. |
n.spde |
The number of basis functions in the mesh model. (Note: may be different than the number of mesh vertices/nodes/knots.) |
n.group |
The size of the group model. |
n.repl |
The total number of replicates. |
group.mesh |
An optional |
weights |
Optional scaling weights to be applied row-wise to the resulting matrix. |
A.loc |
Optional precomputed observation/prediction matrix.
|
A.group |
Optional precomputed observation/prediction matrix for the
group model. |
group.index |
For each observation/prediction value, an index into the
rows of |
block |
Optional indices specifying block groupings: Entries with the
same |
n.block |
The number of blocks. |
block.rescale |
Specifies what scaling method should be used when
joining entries as grouped by a |
... |
Additional parameters. Currently unused. |
Finn Lindgren finn.lindgren@gmail.com
loc <- matrix(runif(10000 * 2) * 1000, 10000, 2) mesh <- inla.mesh.2d( loc = loc, cutoff = 50, max.edge = c(50, 500) ) A <- inla.spde.make.A(mesh, loc = loc)
loc <- matrix(runif(10000 * 2) * 1000, 10000, 2) mesh <- inla.mesh.2d( loc = loc, cutoff = 50, max.edge = c(50, 500) ) A <- inla.spde.make.A(mesh, loc = loc)
Constructs observation/prediction weight matrices for numerical integration
schemes for regional data problems. Primarily intended for internal use by
inla.spde.make.A()
.
inla.spde.make.block.A( A, block, n.block = max(block), weights = NULL, rescale = c("none", "count", "weights", "sum") )
inla.spde.make.block.A( A, block, n.block = max(block), weights = NULL, rescale = c("none", "count", "weights", "sum") )
A |
A precomputed observation/prediction matrix for locations that are to be joined. |
block |
Indices specifying block groupings: Entries with the same
|
n.block |
The number of blocks. |
weights |
Optional scaling weights to be applied row-wise to the input
|
rescale |
Specifies what scaling method should be used when joining the
rows of the
|
Finn Lindgren finn.lindgren@gmail.com
Generates a list of named index vectors for an SPDE model.
inla.spde.make.index(name, n.spde, n.group = 1, n.repl = 1, ...)
inla.spde.make.index(name, n.spde, n.group = 1, n.repl = 1, ...)
name |
A character string with the base name of the effect. |
n.spde |
The size of the model, typically from |
n.group |
The size of the |
n.repl |
The number of model replicates. |
... |
Additional parameters. Currently unused. |
A list of named index vectors.
name |
Indices into the vector of latent variables |
name.group |
'group' indices |
name.repl |
Indices for replicates |
Finn Lindgren finn.lindgren@gmail.com
inla.spde.make.A()
, inla.spde2.result()
loc <- matrix(runif(100 * 2), 100, 2) mesh <- fmesher::fm_mesh_2d_inla(loc.domain = loc, max.edge = c(0.1, 0.5)) spde <- inla.spde2.matern(mesh) index <- inla.spde.make.index("spatial", spde$n.spde, n.repl = 2) spatial.A <- inla.spde.make.A(mesh, loc, index = rep(1:nrow(loc), 2), repl = rep(1:2, each = nrow(loc)) ) y <- 10 + rnorm(100 * 2) stack <- inla.stack( data = list(y = y), A = list(spatial.A), effects = list(c(index, list(intercept = 1))), tag = "tag" ) data <- inla.stack.data(stack, spde = spde) formula <- y ~ -1 + intercept + f(spatial, model = spde, replicate = spatial.repl ) result <- inla(formula, family = "gaussian", data = data, control.predictor = list(A = inla.stack.A(stack)) ) spde.result <- inla.spde2.result(result, "spatial", spde)
loc <- matrix(runif(100 * 2), 100, 2) mesh <- fmesher::fm_mesh_2d_inla(loc.domain = loc, max.edge = c(0.1, 0.5)) spde <- inla.spde2.matern(mesh) index <- inla.spde.make.index("spatial", spde$n.spde, n.repl = 2) spatial.A <- inla.spde.make.A(mesh, loc, index = rep(1:nrow(loc), 2), repl = rep(1:2, each = nrow(loc)) ) y <- 10 + rnorm(100 * 2) stack <- inla.stack( data = list(y = y), A = list(spatial.A), effects = list(c(index, list(intercept = 1))), tag = "tag" ) data <- inla.stack.data(stack, spde = spde) formula <- y ~ -1 + intercept + f(spatial, model = spde, replicate = spatial.repl ) result <- inla(formula, family = "gaussian", data = data, control.predictor = list(A = inla.stack.A(stack)) ) spde.result <- inla.spde2.result(result, "spatial", spde)
List SPDE models supported by inla.spde objects
inla.spde.models(function.names = FALSE) inla.spde1.models() inla.spde2.models()
inla.spde.models(function.names = FALSE) inla.spde1.models() inla.spde2.models()
function.names |
If |
Returns a list of available SPDE model type name lists, one for each
inla.spde model class (currently inla.spde1()
and
inla.spde2()
).
List of available SPDE model type name lists.
Finn Lindgren finn.lindgren@gmail.com
## Not run: ## Display help for each supported inla.spde2 model: for (model in inla.spde2.models()) { print(help(paste("inla.spde2.", model, sep = ""))) } ## Display help for each supported inla.spde* model: models <- inla.spde.models() for (type in names(models)) { for (model in models[[type]]) { print(help(paste("inla.", type, ".", model, sep = ""))) } } ## Display help for each supported inla.spde* model (equivalent to above): for (model in inla.spde.models(function.names = TRUE)) { print(help(model)) } ## End(Not run)
## Not run: ## Display help for each supported inla.spde2 model: for (model in inla.spde2.models()) { print(help(paste("inla.spde2.", model, sep = ""))) } ## Display help for each supported inla.spde* model: models <- inla.spde.models() for (type in names(models)) { for (model in models[[type]]) { print(help(paste("inla.", type, ".", model, sep = ""))) } } ## Display help for each supported inla.spde* model (equivalent to above): for (model in inla.spde.models(function.names = TRUE)) { print(help(model)) } ## End(Not run)
Calculates the precision matrix for given parameter
values based on an inla.spde
model object.
inla.spde.precision(...) inla.spde1.precision(spde, ...) ## S3 method for class 'inla.spde1' inla.spde.precision(spde, ...) inla.spde2.precision( spde, theta = NULL, phi0 = inla.spde2.theta2phi0(spde, theta), phi1 = inla.spde2.theta2phi1(spde, theta), phi2 = inla.spde2.theta2phi2(spde, theta), ... ) ## S3 method for class 'inla.spde2' inla.spde.precision( spde, theta = NULL, phi0 = inla.spde2.theta2phi0(spde, theta), phi1 = inla.spde2.theta2phi1(spde, theta), phi2 = inla.spde2.theta2phi2(spde, theta), ... )
inla.spde.precision(...) inla.spde1.precision(spde, ...) ## S3 method for class 'inla.spde1' inla.spde.precision(spde, ...) inla.spde2.precision( spde, theta = NULL, phi0 = inla.spde2.theta2phi0(spde, theta), phi1 = inla.spde2.theta2phi1(spde, theta), phi2 = inla.spde2.theta2phi2(spde, theta), ... ) ## S3 method for class 'inla.spde2' inla.spde.precision( spde, theta = NULL, phi0 = inla.spde2.theta2phi0(spde, theta), phi1 = inla.spde2.theta2phi1(spde, theta), phi2 = inla.spde2.theta2phi2(spde, theta), ... )
... |
Additional parameters passed on to other methods. |
spde |
An |
theta |
The parameter vector. |
phi0 |
Internal parameter for a generic model. Expert option only. |
phi1 |
Internal parameter for a generic model. Expert option only. |
phi2 |
Internal parameter for a generic model. Expert option only. |
A sparse precision matrix.
Finn Lindgren finn.lindgren@gmail.com
inla.spde.models()
, inla.spde2.generic()
,
inla.spde2.theta2phi0()
, inla.spde2.theta2phi1()
,
inla.spde2.theta2phi2()
Exctract field and parameter values and distributions for an
inla.spde
SPDE effect from an inla result object.
inla.spde.result(...) inla.spde1.result(inla, name, spde, do.transform = TRUE, ...) ## S3 method for class 'inla.spde1' inla.spde.result(inla, name, spde, do.transform = TRUE, ...) inla.spde2.result(inla, name, spde, do.transform = TRUE, ...) ## S3 method for class 'inla.spde2' inla.spde.result(inla, name, spde, do.transform = TRUE, ...)
inla.spde.result(...) inla.spde1.result(inla, name, spde, do.transform = TRUE, ...) ## S3 method for class 'inla.spde1' inla.spde.result(inla, name, spde, do.transform = TRUE, ...) inla.spde2.result(inla, name, spde, do.transform = TRUE, ...) ## S3 method for class 'inla.spde2' inla.spde.result(inla, name, spde, do.transform = TRUE, ...)
... |
Further arguments passed to and from other methods. |
inla |
An |
name |
A character string with the name of the SPDE effect in the inla formula. |
spde |
The |
do.transform |
If |
For inla.spde2
models, a list, where the nominal range and
variance are defined as the values that would have been obtained with a
stationary model and no boundary effects:
marginals.kappa |
Marginal densities for kappa |
marginals.log.kappa |
Marginal densities for log(kappa) |
marginals.log.range.nominal |
Marginal densities for log(range) |
marginals.log.tau |
Marginal densities for log(tau) |
marginals.log.variance.nominal |
Marginal densities for log(variance) |
marginals.range.nominal |
Marginal densities for range |
marginals.tau |
Marginal densities for tau |
marginals.theta |
Marginal densities for the theta parameters |
marginals.values |
Marginal densities for the field values |
marginals.variance.nominal |
Marginal densities for variance |
summary.hyperpar |
The SPDE related part of the inla hyperpar output summary |
summary.log.kappa |
Summary statistics for log(kappa) |
summary.log.range.nominal |
Summary statistics for log(range) |
summary.log.tau |
Summary statistics for log(tau) |
summary.log.variance.nominal |
Summary statistics for log(kappa) |
summary.theta |
Summary statistics for the theta parameters |
summary.values |
Summary statistics for the field values |
Finn Lindgren finn.lindgren@gmail.com
inla.spde.models()
, inla.spde2.matern()
loc <- matrix(runif(100 * 2), 100, 2) mesh <- fmesher::fm_mesh_2d_inla(loc.domain = loc, max.edge = c(0.1, 0.5)) spde <- inla.spde2.matern(mesh) index <- inla.spde.make.index("spatial", mesh$n, n.repl = 2) spatial.A <- inla.spde.make.A(mesh, loc, index = rep(1:nrow(loc), 2), repl = rep(1:2, each = nrow(loc)) ) ## Toy example with no spatial correlation (range=zero) y <- 10 + rnorm(100 * 2) stack <- inla.stack( data = list(y = y), A = list(spatial.A), effects = list(c(index, list(intercept = 1))), tag = "tag" ) data <- inla.stack.data(stack, spde = spde) formula <- y ~ -1 + intercept + f(spatial, model = spde, replicate = spatial.repl ) result <- inla(formula, family = "gaussian", data = data, control.predictor = list(A = inla.stack.A(stack)) ) spde.result <- inla.spde.result(result, "spatial", spde) plot(spde.result$marginals.range.nominal[[1]], type = "l")
loc <- matrix(runif(100 * 2), 100, 2) mesh <- fmesher::fm_mesh_2d_inla(loc.domain = loc, max.edge = c(0.1, 0.5)) spde <- inla.spde2.matern(mesh) index <- inla.spde.make.index("spatial", mesh$n, n.repl = 2) spatial.A <- inla.spde.make.A(mesh, loc, index = rep(1:nrow(loc), 2), repl = rep(1:2, each = nrow(loc)) ) ## Toy example with no spatial correlation (range=zero) y <- 10 + rnorm(100 * 2) stack <- inla.stack( data = list(y = y), A = list(spatial.A), effects = list(c(index, list(intercept = 1))), tag = "tag" ) data <- inla.stack.data(stack, spde = spde) formula <- y ~ -1 + intercept + f(spatial, model = spde, replicate = spatial.repl ) result <- inla(formula, family = "gaussian", data = data, control.predictor = list(A = inla.stack.A(stack)) ) spde.result <- inla.spde.result(result, "spatial", spde) plot(spde.result$marginals.range.nominal[[1]], type = "l")
Old methods fo sampling from a SPDE model. For new code, use
inla.spde.precision()
and inla.qsample()
instead.
inla.spde.sample(...) ## Default S3 method: inla.spde.sample(precision, seed = NULL, ...) ## S3 method for class 'inla.spde' inla.spde.sample(spde, seed = NULL, ...)
inla.spde.sample(...) ## Default S3 method: inla.spde.sample(precision, seed = NULL, ...) ## S3 method for class 'inla.spde' inla.spde.sample(spde, seed = NULL, ...)
... |
Parameters passed on to other methods. |
precision |
A precision matrix. |
seed |
The seed for the pseudo-random generator. |
spde |
An |
Finn Lindgren finn.lindgren@gmail.com
inla.spde.precision()
, inla.qsample()
Create an inla.spde1
model object.
inla.spde1.create( mesh, model = c("matern", "imatern", "matern.osc"), param = NULL, ... ) inla.spde1.matern(mesh, ...) inla.spde1.imatern(mesh, ...) inla.spde1.matern.osc(mesh, ...)
inla.spde1.create( mesh, model = c("matern", "imatern", "matern.osc"), param = NULL, ... ) inla.spde1.matern(mesh, ...) inla.spde1.imatern(mesh, ...) inla.spde1.matern.osc(mesh, ...)
mesh |
The mesh to build the model on, as an |
model |
The name of the model. |
param |
Model specific parameters. |
... |
Additional parameters passed on to other methods. |
Note: This is an old spde object format retained for backwards
compatibility. Please use inla.spde2()
models for new code.
This method constructs an object for SPDE models. Currently implemented:
model="matern"
param
:
alpha
= 1 or 2
basis.T
=
Matrix of basis functions for
basis.K
= Matrix of basis functions for
model="imatern"
param
:
alpha
= 1 or 2
basis.T
=
Matrix of basis functions for
An inla.spde1
object.
Finn Lindgren finn.lindgren@gmail.com
inla.spde2.matern()
, inla.mesh.2d()
,
inla.mesh.basis()
n <- 100 field.fcn <- function(loc) (10 * cos(2 * pi * 2 * (loc[, 1] + loc[, 2]))) loc <- matrix(runif(n * 2), n, 2) ## One field, 2 observations per location idx.y <- rep(1:n, 2) y <- field.fcn(loc[idx.y, ]) + rnorm(length(idx.y)) mesh <- inla.mesh.create(loc, refine = list(max.edge = 0.05)) spde <- inla.spde1.create(mesh, model = "matern") data <- list(y = y, field = mesh$idx$loc[idx.y]) formula <- y ~ -1 + f(field, model = spde) result <- inla(formula, data = data, family = "normal") ## Plot the mesh structure: plot(mesh) if (require(rgl)) { ## Plot the posterior mean: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"], color.palette = colorRampPalette(c("blue", "green", "red")) ) ## Plot residual field: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"] - field.fcn(mesh$loc), color.palette = colorRampPalette(c("blue", "green", "red")) ) }
n <- 100 field.fcn <- function(loc) (10 * cos(2 * pi * 2 * (loc[, 1] + loc[, 2]))) loc <- matrix(runif(n * 2), n, 2) ## One field, 2 observations per location idx.y <- rep(1:n, 2) y <- field.fcn(loc[idx.y, ]) + rnorm(length(idx.y)) mesh <- inla.mesh.create(loc, refine = list(max.edge = 0.05)) spde <- inla.spde1.create(mesh, model = "matern") data <- list(y = y, field = mesh$idx$loc[idx.y]) formula <- y ~ -1 + f(field, model = spde) result <- inla(formula, data = data, family = "normal") ## Plot the mesh structure: plot(mesh) if (require(rgl)) { ## Plot the posterior mean: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"], color.palette = colorRampPalette(c("blue", "green", "red")) ) ## Plot residual field: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"] - field.fcn(mesh$loc), color.palette = colorRampPalette(c("blue", "green", "red")) ) }
Creates and inla.spde2 object describing the internal structure of an
'spde2'
model.
inla.spde2.generic( M0, M1, M2, B0, B1, B2, theta.mu, theta.Q, transform = c("logit", "log", "identity"), theta.initial = theta.mu, fixed = rep(FALSE, length(theta.mu)), theta.fixed = theta.initial[fixed], BLC = cbind(0, diag(nrow = length(theta.mu))), ... )
inla.spde2.generic( M0, M1, M2, B0, B1, B2, theta.mu, theta.Q, transform = c("logit", "log", "identity"), theta.initial = theta.mu, fixed = rep(FALSE, length(theta.mu)), theta.fixed = theta.initial[fixed], BLC = cbind(0, diag(nrow = length(theta.mu))), ... )
M0 |
The symmetric |
M1 |
The square |
M2 |
The symmetric |
B0 |
Basis definition matrix for |
B1 |
Basis definition matrix for |
B2 |
Basis definition matrix for |
theta.mu |
Prior expectation for the |
theta.Q |
Prior precision for the |
transform |
Transformation link for |
theta.initial |
Initial value for the |
fixed |
Logical vector. For every |
theta.fixed |
Vector holding the values of fixed |
BLC |
Basis definition matrix for linear combinations of |
... |
Additional parameters, currently unused. |
theta |
parameter values to be mapped. |
For inla.spde2.generic
, an inla.spde2()
object.
For inla.spde2.theta2phi0/1/2
, a vector of values.
Finn Lindgren finn.lindgren@gmail.com
inla.spde2.models()
, inla.spde2.matern()
Create an inla.spde2
model object for a Matern model. Use
inla.spde2.pcmatern
instead for a PC prior for the parameters.
inla.spde2.matern( mesh, alpha = 2, param = NULL, constr = FALSE, extraconstr.int = NULL, extraconstr = NULL, fractional.method = c("parsimonious", "null"), B.tau = matrix(c(0, 1, 0), 1, 3), B.kappa = matrix(c(0, 0, 1), 1, 3), prior.variance.nominal = 1, prior.range.nominal = NULL, prior.tau = NULL, prior.kappa = NULL, theta.prior.mean = NULL, theta.prior.prec = 0.1, n.iid.group = 1, ... ) inla.spde2.theta2phi0(spde, theta) inla.spde2.theta2phi1(spde, theta) inla.spde2.theta2phi2(spde, theta)
inla.spde2.matern( mesh, alpha = 2, param = NULL, constr = FALSE, extraconstr.int = NULL, extraconstr = NULL, fractional.method = c("parsimonious", "null"), B.tau = matrix(c(0, 1, 0), 1, 3), B.kappa = matrix(c(0, 0, 1), 1, 3), prior.variance.nominal = 1, prior.range.nominal = NULL, prior.tau = NULL, prior.kappa = NULL, theta.prior.mean = NULL, theta.prior.prec = 0.1, n.iid.group = 1, ... ) inla.spde2.theta2phi0(spde, theta) inla.spde2.theta2phi1(spde, theta) inla.spde2.theta2phi2(spde, theta)
mesh |
The mesh to build the model on, as an |
alpha |
Fractional operator order, |
param |
Parameter, e.g. generated by |
constr |
If |
extraconstr.int |
Field integral constraints. |
extraconstr |
Direct linear combination constraints on the basis weights. |
fractional.method |
Specifies the approximation method to use for
fractional (non-integer) |
B.tau |
Matrix with specification of log-linear model for |
B.kappa |
Matrix with specification of log-linear model for
|
prior.variance.nominal |
Nominal prior mean for the field variance |
prior.range.nominal |
Nominal prior mean for the spatial range |
prior.tau |
Prior mean for tau (overrides
|
prior.kappa |
Prior mean for kappa (overrides
|
theta.prior.mean |
(overrides |
theta.prior.prec |
Scalar, vector or matrix, specifying the joint prior
precision for |
n.iid.group |
If greater than 1, build an explicitly iid replicated
model, to support constraints applied to the combined replicates, for
example in a time-replicated spatial model. Constraints can either be
specified for a single mesh, in which case it's applied to the average of
the replicates ( |
... |
Additional parameters for special uses. |
spde |
An spde model object |
theta |
Parameters in the model's internal scale |
This method constructs a Matern SPDE model, with spatial scale parameter
and variance rescaling parameter
.
Stationary models are supported for , with spectral
approximation methods used for non-integer
, with approximation
method determined by
fractional.method
.
Non-stationary models are supported for only, with
The same parameterisation is used in the stationary cases, but with
,
,
, and
constant across
.
Integration and other general linear constraints are supported via the
constr
, extraconstr.int
, and extraconstr
parameters,
which also interact with n.iid.group
.
An inla.spde2
object.
inla.spde2.theta2phi0()
: Convert from theta vector to phi0 values in
the internal spde2 model representation
inla.spde2.theta2phi1()
: Convert from theta vector to phi1 values in
the internal spde2 model representation
inla.spde2.theta2phi2()
: Convert from theta vector to phi2 values in
the internal spde2 model representation
Finn Lindgren finn.lindgren@gmail.com
fmesher::fm_mesh_2d_inla()
, fmesher::fm_rcdt_2d_inla()
,
fmesher::fm_mesh_1d()
, fmesher::fm_basis()
,
inla.spde2.pcmatern()
, inla.spde2.generic()
n <- 100 field.fcn <- function(loc) (10 * cos(2 * pi * 2 * (loc[, 1] + loc[, 2]))) loc <- matrix(runif(n * 2), n, 2) ## One field, 2 observations per location idx.y <- rep(1:n, 2) y <- field.fcn(loc[idx.y, ]) + rnorm(length(idx.y)) mesh <- fm_rcdt_2d_inla(loc, refine = list(max.edge = 0.05)) spde <- inla.spde2.matern(mesh) data <- list(y = y, field = mesh$idx$loc[idx.y]) formula <- y ~ -1 + f(field, model = spde) result <- inla(formula, data = data, family = "normal") ## Plot the mesh structure: plot(mesh) if (require(rgl)) { col.pal <- colorRampPalette(c("blue", "cyan", "green", "yellow", "red")) ## Plot the posterior mean: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"], color.palette = col.pal ) ## Plot residual field: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"] - field.fcn(mesh$loc), color.palette = col.pal ) } result.field <- inla.spde.result(result, "field", spde) plot(result.field$marginals.range.nominal[[1]])
n <- 100 field.fcn <- function(loc) (10 * cos(2 * pi * 2 * (loc[, 1] + loc[, 2]))) loc <- matrix(runif(n * 2), n, 2) ## One field, 2 observations per location idx.y <- rep(1:n, 2) y <- field.fcn(loc[idx.y, ]) + rnorm(length(idx.y)) mesh <- fm_rcdt_2d_inla(loc, refine = list(max.edge = 0.05)) spde <- inla.spde2.matern(mesh) data <- list(y = y, field = mesh$idx$loc[idx.y]) formula <- y ~ -1 + f(field, model = spde) result <- inla(formula, data = data, family = "normal") ## Plot the mesh structure: plot(mesh) if (require(rgl)) { col.pal <- colorRampPalette(c("blue", "cyan", "green", "yellow", "red")) ## Plot the posterior mean: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"], color.palette = col.pal ) ## Plot residual field: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"] - field.fcn(mesh$loc), color.palette = col.pal ) } result.field <- inla.spde.result(result, "field", spde) plot(result.field$marginals.range.nominal[[1]])
Calculates an approximate basis for tau
and kappa
for an
inla.spde2.matern
model where tau
is a rescaling parameter.
inla.spde2.matern.sd.basis( mesh, B.sd, B.range, method = 1, local.offset.compensation = FALSE, alpha = 2, ... )
inla.spde2.matern.sd.basis( mesh, B.sd, B.range, method = 1, local.offset.compensation = FALSE, alpha = 2, ... )
mesh |
An |
B.sd |
Desired basis for log-standard deviations. |
B.range |
Desired basis for spatial range. |
method |
Construction method selector. Expert option only. |
local.offset.compensation |
If |
alpha |
The model |
... |
Additional parameters passed on to internal
|
List of basis specifications
B.tau |
Basis for
|
B.kappa |
Basis for |
Intended for
passing on to inla.spde2.matern()
.
Finn Lindgren finn.lindgren@gmail.com
Create an inla.spde2
model object for a Matern model, using a PC
prior for the parameters.
inla.spde2.pcmatern( mesh, alpha = 2, param = NULL, constr = FALSE, extraconstr.int = NULL, extraconstr = NULL, fractional.method = c("parsimonious", "null"), n.iid.group = 1, prior.range = NULL, prior.sigma = NULL )
inla.spde2.pcmatern( mesh, alpha = 2, param = NULL, constr = FALSE, extraconstr.int = NULL, extraconstr = NULL, fractional.method = c("parsimonious", "null"), n.iid.group = 1, prior.range = NULL, prior.sigma = NULL )
mesh |
The mesh to build the model on, as an |
alpha |
Fractional operator order, |
param |
Further model parameters. Not currently used. |
constr |
If |
extraconstr.int |
Field integral constraints. |
extraconstr |
Direct linear combination constraints on the basis weights. |
fractional.method |
Specifies the approximation method to use for
fractional (non-integer) |
n.iid.group |
If greater than 1, build an explicitly iid replicated
model, to support constraints applied to the combined replicates, for
example in a time-replicated spatial model. Constraints can either be
specified for a single mesh, in which case it's applied to the average of
the replicates ( |
prior.range |
A length 2 vector, with |
prior.sigma |
A length 2 vector, with |
This method constructs a Matern SPDE model, with spatial range
and standard deviation parameter
. In the parameterisation
the spatial scale parameter , where
, and
is proportional to
.
Stationary models are supported for ,
with spectral approximation methods used for non-integer
, with
approximation method determined by
fractional.method
.
Integration and other general linear constraints are supported via the
constr
, extraconstr.int
, and extraconstr
parameters,
which also interact with n.iid.group
.
The joint PC prior density for the spatial range, , and the
marginal standard deviation,
, and is
where
and
are hyperparameters that
must be determined by the analyst. The practical approach for this in INLA
is to require the user to indirectly specify these hyperparameters through
and
where the user specifies the lower tail quantile and probability for the
range ( and
) and the upper tail quantile and
probability for the standard deviation (
and
).
This allows the user to control the priors of the parameters by supplying knowledge of the scale of the problem. What is a reasonable upper magnitude for the spatial effect and what is a reasonable lower scale at which the spatial effect can operate? The shape of the prior was derived through a construction that shrinks the spatial effect towards a base model of no spatial effect in the sense of distance measured by Kullback-Leibler divergence.
The prior is constructed in two steps, under the idea that having a spatial
field is an extension of not having a spatial field. First, a spatially
constant random effect () with finite variance is more
complex than not having a random effect (
). Second, a
spatial field with spatial variation (
) is more complex
than the random effect with no spatial variation. Each of these extensions
are shrunk towards the simpler model and, as a result, we shrink the spatial
field towards the base model of no spatial variation and zero variance
(
and
).
The details behind the construction of the prior is presented in Fuglstad, et al. (2016) and is based on the PC prior framework (Simpson, et al., 2015).
An inla.spde2
object.
Finn Lindgren finn.lindgren@gmail.com
Fuglstad, G.-A., Simpson, D., Lindgren, F., and Rue, H. (2016) Constructing Priors that Penalize the Complexity of Gaussian Random Fields. arXiv:1503.00256
Simpson, D., Rue, H., Martins, T., Riebler, A., and Sørbye, S. (2015) Penalising model component complexity: A principled, practical approach to constructing priors. arXiv:1403.4630
fmesher::fm_mesh_2d_inla()
, fmesher::fm_rcdt_2d_inla()
,
fmesher::fm_mesh_1d()
, fmesher::fm_basis()
,
inla.spde2.matern()
, inla.spde2.generic()
## Spatial interpolation n <- 100 field.fcn <- function(loc) (10 * cos(2 * pi * 2 * (loc[, 1] + loc[, 2]))) loc <- matrix(runif(n * 2), n, 2) ## One field, 2 observations per location idx.y <- rep(1:n, 2) y <- field.fcn(loc[idx.y, ]) + rnorm(length(idx.y)) mesh <- fm_mesh_2d_inla(loc, max.edge = 0.05, cutoff = 0.01) spde <- inla.spde2.pcmatern(mesh, prior.range = c(0.01, 0.1), prior.sigma = c(100, 0.1) ) data <- list(y = y, field = mesh$idx$loc[idx.y]) formula <- y ~ -1 + f(field, model = spde) result <- inla(formula, data = data, family = "normal") ## Plot the mesh structure: plot(mesh) if (require(rgl)) { col.pal <- colorRampPalette(c("blue", "cyan", "green", "yellow", "red")) ## Plot the posterior mean: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"], color.palette = col.pal ) ## Plot residual field: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"] - field.fcn(mesh$loc), color.palette = col.pal ) } result.field <- inla.spde.result(result, "field", spde) par(mfrow = c(2, 1)) plot(result.field$marginals.range.nominal[[1]], type = "l", main = "Posterior density for range" ) plot(inla.tmarginal(sqrt, result.field$marginals.variance.nominal[[1]]), type = "l", main = "Posterior density for std.dev." ) par(mfrow = c(1, 1)) ## Spatial model set.seed(1234234) ## Generate spatial locations nObs <- 200 loc <- matrix(runif(nObs * 2), nrow = nObs, ncol = 2) ## Generate observation of spatial field nu <- 1.0 rhoT <- 0.2 kappaT <- sqrt(8 * nu) / rhoT sigT <- 1.0 Sig <- sigT^2 * inla.matern.cov( nu = nu, kappa = kappaT, x = as.matrix(dist(loc)), d = 2, corr = TRUE ) L <- t(chol(Sig)) u <- L %*% rnorm(nObs) ## Construct observation with nugget sigN <- 0.1 y <- u + sigN * rnorm(nObs) ## Create the mesh and spde object mesh <- fm_mesh_2d_inla(loc, max.edge = 0.05, cutoff = 0.01 ) spde <- inla.spde2.pcmatern(mesh, prior.range = c(0.01, 0.05), prior.sigma = c(10, 0.05) ) ## Create projection matrix for observations A <- fm_basis(mesh = mesh, loc = loc) ## Run model without any covariates idx <- 1:spde$n.spde res <- inla(y ~ f(idx, model = spde) - 1, data = list(y = y, idx = idx, spde = spde), control.predictor = list(A = A) ) ## Re-run model with fixed range spde.fixed <- inla.spde2.pcmatern(mesh, prior.range = c(0.2, NA), prior.sigma = c(10, 0.05) ) res.fixed <- inla(y ~ f(idx, model = spde) - 1, data = list(y = y, idx = idx, spde = spde.fixed), control.predictor = list(A = A) )
## Spatial interpolation n <- 100 field.fcn <- function(loc) (10 * cos(2 * pi * 2 * (loc[, 1] + loc[, 2]))) loc <- matrix(runif(n * 2), n, 2) ## One field, 2 observations per location idx.y <- rep(1:n, 2) y <- field.fcn(loc[idx.y, ]) + rnorm(length(idx.y)) mesh <- fm_mesh_2d_inla(loc, max.edge = 0.05, cutoff = 0.01) spde <- inla.spde2.pcmatern(mesh, prior.range = c(0.01, 0.1), prior.sigma = c(100, 0.1) ) data <- list(y = y, field = mesh$idx$loc[idx.y]) formula <- y ~ -1 + f(field, model = spde) result <- inla(formula, data = data, family = "normal") ## Plot the mesh structure: plot(mesh) if (require(rgl)) { col.pal <- colorRampPalette(c("blue", "cyan", "green", "yellow", "red")) ## Plot the posterior mean: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"], color.palette = col.pal ) ## Plot residual field: plot(mesh, rgl = TRUE, result$summary.random$field[, "mean"] - field.fcn(mesh$loc), color.palette = col.pal ) } result.field <- inla.spde.result(result, "field", spde) par(mfrow = c(2, 1)) plot(result.field$marginals.range.nominal[[1]], type = "l", main = "Posterior density for range" ) plot(inla.tmarginal(sqrt, result.field$marginals.variance.nominal[[1]]), type = "l", main = "Posterior density for std.dev." ) par(mfrow = c(1, 1)) ## Spatial model set.seed(1234234) ## Generate spatial locations nObs <- 200 loc <- matrix(runif(nObs * 2), nrow = nObs, ncol = 2) ## Generate observation of spatial field nu <- 1.0 rhoT <- 0.2 kappaT <- sqrt(8 * nu) / rhoT sigT <- 1.0 Sig <- sigT^2 * inla.matern.cov( nu = nu, kappa = kappaT, x = as.matrix(dist(loc)), d = 2, corr = TRUE ) L <- t(chol(Sig)) u <- L %*% rnorm(nObs) ## Construct observation with nugget sigN <- 0.1 y <- u + sigN * rnorm(nObs) ## Create the mesh and spde object mesh <- fm_mesh_2d_inla(loc, max.edge = 0.05, cutoff = 0.01 ) spde <- inla.spde2.pcmatern(mesh, prior.range = c(0.01, 0.05), prior.sigma = c(10, 0.05) ) ## Create projection matrix for observations A <- fm_basis(mesh = mesh, loc = loc) ## Run model without any covariates idx <- 1:spde$n.spde res <- inla(y ~ f(idx, model = spde) - 1, data = list(y = y, idx = idx, spde = spde), control.predictor = list(A = A) ) ## Re-run model with fixed range spde.fixed <- inla.spde2.pcmatern(mesh, prior.range = c(0.2, NA), prior.sigma = c(10, 0.05) ) res.fixed <- inla(y ~ f(idx, model = spde) - 1, data = list(y = y, idx = idx, spde = spde.fixed), control.predictor = list(A = A) )
fmesher::fm_transform
in favour of
fmesher::fm_transform()
.
Handles transformation of various inla objects according to coordinate
reference systems of sf::crs
, sp::CRS
or inla.CRS
class.
inla.spTransform(x, CRSobj, ...)
inla.spTransform(x, CRSobj, ...)
x |
The object that should be transformed from it's current CRS to a new CRS |
CRSobj |
passed on as the |
... |
Potential other arguments for |
The object is returned with its coordinates transformed
Finn Lindgren finn.lindgren@gmail.com
if (require("sf") && require("sp") && require("fmesher")) { latt <- inla.mesh.lattice(-10:10, 40:60) mesh1 <- inla.mesh.create( lattice = latt, extend = FALSE, refine = FALSE, crs = fm_CRS("longlat_norm") ) mesh2 <- fm_transform(mesh1, fm_crs("lambert_globe")) print(summary(mesh1)) print(summary(mesh2)) }
if (require("sf") && require("sp") && require("fmesher")) { latt <- inla.mesh.lattice(-10:10, 40:60) mesh1 <- inla.mesh.create( lattice = latt, extend = FALSE, refine = FALSE, crs = fm_CRS("longlat_norm") ) mesh2 <- fm_transform(mesh1, fm_crs("lambert_globe")) print(summary(mesh1)) print(summary(mesh2)) }
Initialize the definition file and print the path to the internal script to transfer ssh-keys
inla.ssh.copy.id() inla.remote()
inla.ssh.copy.id() inla.remote()
inla.remote
is used once to setup the remote host
information file (definition file) in the users home directory; see the FAQ
entry on this issue for more information. inla.ssh.copy.id
will
return the path to the internal script to transfer ssh-keys.
Havard Rue hrue@r-inla.org
##See the FAQ entry on this issue on r-inla.org.
##See the FAQ entry on this issue on r-inla.org.
Functions for combining data, effects and observation matrices into
inla.stack
objects, and extracting information from such objects.
inla.stack.remove.unused(stack) inla.stack.compress(stack, remove.unused = TRUE) inla.stack(..., compress = TRUE, remove.unused = TRUE, multi.family = FALSE) inla.stack.sum( data, A, effects, responses = NULL, tag = "", compress = TRUE, remove.unused = TRUE ) inla.stack.join( ..., compress = TRUE, remove.unused = TRUE, multi.family = FALSE ) inla.stack.index(stack, tag) inla.stack.LHS(stack) inla.stack.RHS(stack) inla.stack.data(stack, ..., .response.name = NULL) inla.stack.A(stack) inla.stack.response(stack, drop = TRUE) ## S3 method for class 'inla.data.stack' print(x, ...)
inla.stack.remove.unused(stack) inla.stack.compress(stack, remove.unused = TRUE) inla.stack(..., compress = TRUE, remove.unused = TRUE, multi.family = FALSE) inla.stack.sum( data, A, effects, responses = NULL, tag = "", compress = TRUE, remove.unused = TRUE ) inla.stack.join( ..., compress = TRUE, remove.unused = TRUE, multi.family = FALSE ) inla.stack.index(stack, tag) inla.stack.LHS(stack) inla.stack.RHS(stack) inla.stack.data(stack, ..., .response.name = NULL) inla.stack.A(stack) inla.stack.response(stack, drop = TRUE) ## S3 method for class 'inla.data.stack' print(x, ...)
stack |
A |
remove.unused |
If |
... |
For |
compress |
If |
multi.family |
logical or character. For |
data |
A list or codedata.frame of named data vectors. Scalars are expanded to match the number of rows in the A matrices, or any non-scalar data vectors. An error is given if the input is inconsistent. |
A |
A list of observation matrices. Scalars are expanded to diagonal matrices matching the effect vector lengths. An error is given if the input is inconsistent or ambiguous. |
effects |
A collection of effects/predictors. Each list element
corresponds to an observation matrix, and must either be a single vector, a
list of vectors, or a |
responses |
A list of response vectors, matrices, data.frame, or other special
response objects, such as |
tag |
A string specifying a tag for later identification. |
.response.name |
The name to assign to the response variable when
extracting data from the stack. Default is |
drop |
logical indicating whether to return the contained object
instead of the full list, when the stack responses list has length 1.
Default is |
x |
An |
For models with a single effects collection, the outer list container for
A
and effects
may be omitted.
Component size definitions:
effect blocks
effects
data values
effect size for block
total
effect size
Input:
data
vectors, each of length
A
matrices of size
effects
collections of effect
vectors of length
where
and
and for each block , any missing
is replaced by an
NA
vector.
A data stack of class inla.data.stack
.
Elements:
data
A
data.names
List
of data names, length
effect.names
List of effect names,
length
n.data
Data length,
index
List indexed by tag
s, each element indexing into
inla.stack.remove.unused()
: Remove unused entries from an existing stack
inla.stack.compress()
: Compress an existing stack by removing duplicates
inla.stack.sum()
: Create data stack as a sum of predictors
inla.stack.join()
: Join two or more data stacks
inla.stack.index()
: Extract tagged indices
inla.stack.LHS()
: Extract data associated with the "left hand side" of the model
(e.g. the data itself, Ntrials
, link
, E
)
inla.stack.RHS()
: Extract data associated with the "right hand side" of the model
(all the covariates/predictors)
inla.stack.data()
: Extract data for an inla call, and optionally join with other variables
inla.stack.A()
: Extract the "A matrix" for control.predictor
inla.stack.response()
: Extract the response variable or list of
response objects
print(inla.data.stack)
: Print information about an inla.data.stack
inla.stack.remove.unused
: Remove
unused entries from an existing stack
inla.stack.compress
: Compress an existing stack by removing
duplicates
inla.stack
: Shorthand for inla.stack.join and inla.stack.sum
inla.stack.sum
: Create data stack as a sum of predictors
inla.stack.join
: Join two or more data stacks
inla.stack.index
: Extract tagged indices
inla.stack.LHS
: Extract data associated with the "left hand
side" of the model (e.g. the data itself, Ntrials
, link
,
E
)
inla.stack.RHS
: Extract data associated with the "right hand
side" of the model (all the covariates/predictors)
inla.stack.data
: Extract data for an inla call, and optionally
join with other variables
inla.stack.A
: Extract the "A matrix" for control.predictor
inla.spde.make.A()
, inla.spde.make.index()
library(fmesher) n <- 200 loc <- matrix(runif(n * 2), n, 2) mesh <- fm_mesh_2d( loc.domain = loc, max.edge = c(0.05, 0.2) ) proj.obs <- fm_evaluator(mesh, loc = loc) proj.pred <- fm_evaluator(mesh, loc = mesh$loc) spde <- inla.spde2.pcmatern(mesh, prior.range = c(0.01, 0.01), prior.sigma = c(10, 0.01) ) covar <- rnorm(n) field <- inla.qsample(n = 1, Q = inla.spde.precision(spde, theta = log(c(0.5, 1))))[, 1] y <- 2 * covar + fm_evaluate(proj.obs, field) A.obs <- inla.spde.make.A(mesh, loc = loc) A.pred <- inla.spde.make.A(mesh, loc = proj.pred$loc) stack.obs <- inla.stack( data = list(y = y), A = list(A.obs, 1), effects = list(c( list(Intercept = 1), inla.spde.make.index("spatial", spde$n.spde) ), covar = covar ), tag = "obs" ) stack.pred <- inla.stack( data = list(y = NA), A = list(A.pred), effects = list(c( list(Intercept = 1), inla.spde.make.index("spatial", mesh$n) )), tag = "pred" ) stack <- inla.stack(stack.obs, stack.pred) formula <- y ~ -1 + Intercept + covar + f(spatial, model = spde) result1 <- inla(formula, data = inla.stack.data(stack.obs, spde = spde), family = "gaussian", control.predictor = list( A = inla.stack.A(stack.obs), compute = TRUE ) ) plot(y, result1$summary.fitted.values[inla.stack.index(stack.obs, "obs")$data, "mean"], main = "Observations vs posterior predicted values at the data locations" ) result2 <- inla(formula, data = inla.stack.data(stack, spde = spde), family = "gaussian", control.predictor = list( A = inla.stack.A(stack), compute = TRUE ) ) field.pred <- fm_evaluate( proj.pred, result2$summary.fitted.values[inla.stack.index(stack, "pred")$data, "mean"] ) field.pred.sd <- fm_evaluate( proj.pred, result2$summary.fitted.values[inla.stack.index(stack, "pred")$data, "sd"] ) plot(field, field.pred, main = "True vs predicted field") abline(0, 1) image(fm_evaluate(mesh, field = field, dims = c(200, 200) ), main = "True field" ) image(fm_evaluate(mesh, field = field.pred, dims = c(200, 200) ), main = "Posterior field mean" ) image(fm_evaluate(mesh, field = field.pred.sd, dims = c(200, 200) ), main = "Prediction standard deviation" ) plot(field, (field.pred - field) / 1, main = "True field vs standardised prediction residuals" )
library(fmesher) n <- 200 loc <- matrix(runif(n * 2), n, 2) mesh <- fm_mesh_2d( loc.domain = loc, max.edge = c(0.05, 0.2) ) proj.obs <- fm_evaluator(mesh, loc = loc) proj.pred <- fm_evaluator(mesh, loc = mesh$loc) spde <- inla.spde2.pcmatern(mesh, prior.range = c(0.01, 0.01), prior.sigma = c(10, 0.01) ) covar <- rnorm(n) field <- inla.qsample(n = 1, Q = inla.spde.precision(spde, theta = log(c(0.5, 1))))[, 1] y <- 2 * covar + fm_evaluate(proj.obs, field) A.obs <- inla.spde.make.A(mesh, loc = loc) A.pred <- inla.spde.make.A(mesh, loc = proj.pred$loc) stack.obs <- inla.stack( data = list(y = y), A = list(A.obs, 1), effects = list(c( list(Intercept = 1), inla.spde.make.index("spatial", spde$n.spde) ), covar = covar ), tag = "obs" ) stack.pred <- inla.stack( data = list(y = NA), A = list(A.pred), effects = list(c( list(Intercept = 1), inla.spde.make.index("spatial", mesh$n) )), tag = "pred" ) stack <- inla.stack(stack.obs, stack.pred) formula <- y ~ -1 + Intercept + covar + f(spatial, model = spde) result1 <- inla(formula, data = inla.stack.data(stack.obs, spde = spde), family = "gaussian", control.predictor = list( A = inla.stack.A(stack.obs), compute = TRUE ) ) plot(y, result1$summary.fitted.values[inla.stack.index(stack.obs, "obs")$data, "mean"], main = "Observations vs posterior predicted values at the data locations" ) result2 <- inla(formula, data = inla.stack.data(stack, spde = spde), family = "gaussian", control.predictor = list( A = inla.stack.A(stack), compute = TRUE ) ) field.pred <- fm_evaluate( proj.pred, result2$summary.fitted.values[inla.stack.index(stack, "pred")$data, "mean"] ) field.pred.sd <- fm_evaluate( proj.pred, result2$summary.fitted.values[inla.stack.index(stack, "pred")$data, "sd"] ) plot(field, field.pred, main = "True vs predicted field") abline(0, 1) image(fm_evaluate(mesh, field = field, dims = c(200, 200) ), main = "True field" ) image(fm_evaluate(mesh, field = field.pred, dims = c(200, 200) ), main = "Posterior field mean" ) image(fm_evaluate(mesh, field = field.pred.sd, dims = c(200, 200) ), main = "Prediction standard deviation" ) plot(field, (field.pred - field) / 1, main = "True field vs standardised prediction residuals" )
Create a survival object, to be used as a response variable in a model
formula for the inla()
function for survival models.
inla.surv(time, event, time2, truncation, subject = NULL, cure = NULL) ## S3 method for class 'inla.surv' plot(x, y, ...) ## S3 method for class 'inla.surv' print(x, ...) as.inla.surv(object, ...) is.inla.surv(object)
inla.surv(time, event, time2, truncation, subject = NULL, cure = NULL) ## S3 method for class 'inla.surv' plot(x, y, ...) ## S3 method for class 'inla.surv' print(x, ...) as.inla.surv(object, ...) is.inla.surv(object)
time |
For right censored data, this is the follow up time. For interval data, this is the starting time for the interval. For in-interval event, this is the observed time (in the interval) for the event. For left censored data, this the censoring time. |
event |
The status indicator, 1=observed event, 0=right censored event, 2=left censored event, 3=interval censored event, and 4=observed event in an interval (left, right). |
time2 |
Ending time for the interval censored data or an in-interval event. |
truncation |
Left truncation. If missing it is assumed to be 0. The lower limit for event=4. |
subject |
Patient number in multiple event data, not needed otherwise. |
cure |
A matrix of covariates that can be used with a cure-model. |
x |
Object to plot or print |
y |
Object to plot (not in use) |
... |
Additional argument |
object |
Any |
An object of class inla.surv
. There are methods for
print
, plot
for inla.surv
objects.
is.inla.surv
returns TRUE
if object
inherits from class
inla.surv
, otherwise FALSE
.
as.inla.surv
returns an object of class inla.surv
Sara Martino, Rupali Akerkar and Haavard Rue
## First example trt = c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) time = c(17,42,44,48,60,72,74,95,103, 108, 122, 144, 167, 170, 183, 185, 193, 195, 197, 208, 234, 235, 254, 307, 315, 401, 445, 464, 484, 528, 542, 567, 577, 580, 795, 855, 1174, 1214, 1232, 1366, 1455, 1585, 1622, 1626, 1736, 1,63, 105, 125, 182, 216, 250, 262, 301, 301, 342, 354, 356, 358, 380, 383, 383, 388, 394, 408, 460, 489, 499, 523, 524, 535, 562, 569, 675, 676, 748, 778, 786, 797, 955, 968, 977, 1245, 1271, 1420, 1460, 1516, 1551, 1690, 1694) event = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,0,1,0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,1) y = inla.surv(time, event) ## Second example time = c(182,182,63,68,182,152,182,130,134,145,152,182,98,152,182,88,95,105,130,137,167,182, 152,182,81,182,71,84,126,134,152,182) event = c(1,0,1,1,0,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,0) subject = c(1,2,3,3,3,4,4,5,5,5,5,5,6,6,6,7,7,7,7,7,7,7,8,8,9,9,10,10,10,10,10,10) y = inla.surv(time, event, subject=subject)
## First example trt = c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) time = c(17,42,44,48,60,72,74,95,103, 108, 122, 144, 167, 170, 183, 185, 193, 195, 197, 208, 234, 235, 254, 307, 315, 401, 445, 464, 484, 528, 542, 567, 577, 580, 795, 855, 1174, 1214, 1232, 1366, 1455, 1585, 1622, 1626, 1736, 1,63, 105, 125, 182, 216, 250, 262, 301, 301, 342, 354, 356, 358, 380, 383, 383, 388, 394, 408, 460, 489, 499, 523, 524, 535, 562, 569, 675, 676, 748, 778, 786, 797, 955, 968, 977, 1245, 1271, 1420, 1460, 1516, 1551, 1690, 1694) event = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,0,1,0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,1) y = inla.surv(time, event) ## Second example time = c(182,182,63,68,182,152,182,130,134,145,152,182,98,152,182,88,95,105,130,137,167,182, 152,182,81,182,71,84,126,134,152,182) event = c(1,0,1,1,0,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,0) subject = c(1,2,3,3,3,4,4,5,5,5,5,5,6,6,6,7,7,7,7,7,7,7,8,8,9,9,10,10,10,10,10,10) y = inla.surv(time, event, subject=subject)
Functions to upgrade the INLA
-package to the current version.
inla.update(lib = NULL, testing = FALSE, ask = TRUE) inla.upgrade(lib = NULL, testing = FALSE, ask = TRUE)
inla.update(lib = NULL, testing = FALSE, ask = TRUE) inla.upgrade(lib = NULL, testing = FALSE, ask = TRUE)
lib |
Location to install the library. |
testing |
If |
ask |
same argument as in |
inla.upgrade
will update the INLA package to the current
version, and inla.update
do the same for backward compatibility. This
function is simple wrapper for update.packages
using the INLA
repository.
Havard Rue hrue@r-inla.org
update.packages
Show the version of the INLA-package
inla.version(what = c("default", "version", "date"))
inla.version(what = c("default", "version", "date"))
what |
What to show version of |
inla.version
display the current version information using
cat
with default
or info
, or return other specific
requests through the call.
Havard Rue hrue@r-inla.org
## Summary of all inla.version() ## The building date inla.version("date")
## Summary of all inla.version() ## The building date inla.version("date")
Sample, transform and evaluate from from a joint marginal approximation as
returned using argument selection
in inla
.
inla.rjmarginal(n, jmarginal, constr) inla.rjmarginal.eval(fun, samples, ...) ## S3 method for class 'inla.jmarginal' print(x, ...) ## S3 method for class 'inla.jmarginal' summary(object, ...) ## S3 method for class 'summary.inla.jmarginal' print(x, ...) inla.tjmarginal(jmarginal, A) inla.1djmarginal(jmarginal)
inla.rjmarginal(n, jmarginal, constr) inla.rjmarginal.eval(fun, samples, ...) ## S3 method for class 'inla.jmarginal' print(x, ...) ## S3 method for class 'inla.jmarginal' summary(object, ...) ## S3 method for class 'summary.inla.jmarginal' print(x, ...) inla.tjmarginal(jmarginal, A) inla.1djmarginal(jmarginal)
n |
The number of samples |
jmarginal |
A marginal object given either by a |
constr |
Optional linear constraints; see |
fun |
A function which is evaluated for each sample, similar to
|
samples |
The samples, as in the form of the output from
|
... |
Arguments passed on to other methods (printing and summarising) |
x |
Object to be printed |
object |
Object to be summarised |
A |
A matrix used for the linear combination |
THESE FUNCTIONS ARE EXPERIMENTAL FOR THE MOMENT (JULY 2020)
inla.rjmarginal
returns a list with the samples in samples
(matrix) and the corresponding log-densities in log.density
(vector).
Each column in samples
contains one sample.
inla.rjmarginal.eval
returns a matrix, where each row is the (vector)
function evaluated at each sample.
inla.tjmarginal
returns a inla.jmarginal
-object of the linear
combination defined by the matrix A
.
inla.1djmarginal
return the marginal densities from a joint
approximation.
Cristian Chiuchiolo and Havard Rue hrue@r-inla.org
n = 10 x = 1+rnorm(n) xx = 3 + rnorm(n) y = 1 + x + xx + rnorm(n) selection = list(xx=1, x=1) r = inla(y ~ 1 + x + xx, data = data.frame(y, x, xx), selection = selection) ns = 100 xx = inla.rjmarginal(ns, r) print(cbind(mean = r$selection$mean, sample.mean = rowMeans(xx$samples))) print("cov matrix") print(round(r$selection$cov.matrix, dig=3)) print("sample cov matrix") print(round(cov(t(xx$samples)), dig=3)) skew = function(z) mean((z-mean(z))^3)/var(z)^1.5 print(round(cbind(skew = r$selection$skewness, sample.skew = apply(xx$samples, 1, skew)), digits = 3)) ## illustrating the eval function n = 10 x = rnorm(n) eta = 1 + x y = eta + rnorm(n, sd=0.1) selection = list(x = 1, '(Intercept)' = 1) r = inla(y ~ 1 + x, data = data.frame(y, x), selection = selection) xx = inla.rjmarginal(100, r) xx.eval = inla.rjmarginal.eval(function() c(x, Intercept), xx) print(cbind(xx$samples[, 1])) print(cbind(xx.eval[, 1])) constr <- list(A = matrix(1, ncol = nrow(xx$samples), nrow = 1), e = 1) x <- inla.rjmarginal(10, r, constr = constr) A <- matrix(rnorm(nrow(xx$samples)^2), nrow(xx$samples), nrow(xx$samples)) b <- inla.tjmarginal(r, A) b.marg <- inla.1djmarginal(b)
n = 10 x = 1+rnorm(n) xx = 3 + rnorm(n) y = 1 + x + xx + rnorm(n) selection = list(xx=1, x=1) r = inla(y ~ 1 + x + xx, data = data.frame(y, x, xx), selection = selection) ns = 100 xx = inla.rjmarginal(ns, r) print(cbind(mean = r$selection$mean, sample.mean = rowMeans(xx$samples))) print("cov matrix") print(round(r$selection$cov.matrix, dig=3)) print("sample cov matrix") print(round(cov(t(xx$samples)), dig=3)) skew = function(z) mean((z-mean(z))^3)/var(z)^1.5 print(round(cbind(skew = r$selection$skewness, sample.skew = apply(xx$samples, 1, skew)), digits = 3)) ## illustrating the eval function n = 10 x = rnorm(n) eta = 1 + x y = eta + rnorm(n, sd=0.1) selection = list(x = 1, '(Intercept)' = 1) r = inla(y ~ 1 + x, data = data.frame(y, x), selection = selection) xx = inla.rjmarginal(100, r) xx.eval = inla.rjmarginal.eval(function() c(x, Intercept), xx) print(cbind(xx$samples[, 1])) print(cbind(xx.eval[, 1])) constr <- list(A = matrix(1, ncol = nrow(xx$samples), nrow = 1), e = 1) x <- inla.rjmarginal(10, r, constr = constr) A <- matrix(rnorm(nrow(xx$samples)^2), nrow(xx$samples), nrow(xx$samples)) b <- inla.tjmarginal(r, A) b.marg <- inla.1djmarginal(b)
A framework for defining joint priors in R
inla.jp.define(jp = NULL, ...)
inla.jp.define(jp = NULL, ...)
jp |
The |
... |
Named list of variables that defines the environment of |
This allows joint priors to be defined in R
.
This function is for internal use only.
Havard Rue hrue@r-inla.org
Times of infection from the time to insertion of the catheter for 38 kindey patients using portable dialysis equipment
A data frame with 76 observations on the following 9 variables.
a numeric vector. Time to infection from the insertion of catheter
a numeric vector. 1: time of infection 0: time of censuring
a numeric vector. Age of the patient at the time of infection
a numeric vector. Sex of the patient 0: male 1:female
a numeric vector. Type of disease
a numeric vector. Dummy variable to codify the disease type.
a numeric vector. Dummy variable to codify the disease type.
a numeric vector. Dummy variable to codify the disease type.
a numeric vector. Patient code.
McGilchrist and C.W. Aisbett (1991), Regression with frailty in survival analysis, Biometrics,vol.47,pages 461–166.
D.J. Spiegelhalter and A. Thomas and N.G. Best and W.R. Gilks (1995) BUGS: Bayesian Inference Using Gibbs sampling, Version 0.50., MRC Biostatistics Unit, Cambridre, England.
These functions define mapping in between two-dimensional indices on a
lattice and the one-dimensional node representation used in inla
.
inla.lattice2node.mapping(nrow, ncol) inla.node2lattice.mapping(nrow, ncol) inla.lattice2node(irow, icol, nrow, ncol) inla.node2lattice(node, nrow, ncol) inla.matrix2vector(a.matrix) inla.vector2matrix(a.vector, nrow, ncol)
inla.lattice2node.mapping(nrow, ncol) inla.node2lattice.mapping(nrow, ncol) inla.lattice2node(irow, icol, nrow, ncol) inla.node2lattice(node, nrow, ncol) inla.matrix2vector(a.matrix) inla.vector2matrix(a.vector, nrow, ncol)
nrow |
Number of rows in the lattice. |
ncol |
Number of columns in the lattice. |
irow |
Lattice row index, between |
icol |
Lattice column index, between |
node |
The node index, between |
a.matrix |
is a matrix to be mapped to a vector using internal
representation defined by |
a.vector |
is a vector to be mapped into a matrix using the internal
representation defined by |
The mapping from node to lattice follows the default R
behaviour
(which is column based storage), and as.vector(A)
and matrix(a, nrow, ncol)
can be used instead of inla.matrix2vector
and
inla.vector2matrix
.
inla.lattice2node.mapping
returns the hole mapping as a
matrix, and inla.node2lattice.mapping
returns the hole mapping as
list(irow=..., icol=...)
. inla.lattice2node
and
inla.node2lattice
provide the mapping for a given set of lattice
indices and nodes. inla.matrix2vector
provide the mapped vector from
a matrix, and inla.vector2matrix
provide the inverse mapped matrix
from vector.
Havard Rue hrue@r-inla.org
## write out the mapping using the two alternatives nrow = 2 ncol = 3 mapping = inla.lattice2node.mapping(nrow,ncol) for (i in 1:nrow){ for(j in 1:ncol){ print(paste("Alt.1: lattice index [", i,",", j,"] corresponds", "to node [", mapping[i,j],"]", sep="")) } } for (i in 1:nrow){ for(j in 1:ncol){ print(paste("Alt.2: lattice index [", i,",", j,"] corresponds to node [", inla.lattice2node(i,j,nrow,ncol), "]", sep="")) } } inv.mapping = inla.node2lattice.mapping(nrow,ncol) for(node in 1:(nrow*ncol)) print(paste("Alt.1: node [", node, "] corresponds to lattice index [", inv.mapping$irow[node], ",", inv.mapping$icol[node],"]", sep="")) for(node in 1:(nrow*ncol)) print(paste("Alt.2: node [", node, "] corresponds to lattice index [", inla.node2lattice(node,nrow,ncol)$irow[1], ",", inla.node2lattice(node,nrow,ncol)$icol[1],"]", sep="")) ## apply the mapping from matrix to vector and back n = nrow*ncol z = matrix(1:n,nrow,ncol) z.vector = inla.matrix2vector(z) # as.vector(z) could also be used print(mapping) print(z) print(z.vector) ## the vector2matrix is the inverse, and should give us the z-matrix ## back. matrix(z.vector, nrow, ncol) could also be used here. z.matrix = inla.vector2matrix(z.vector, nrow, ncol) print(z.matrix)
## write out the mapping using the two alternatives nrow = 2 ncol = 3 mapping = inla.lattice2node.mapping(nrow,ncol) for (i in 1:nrow){ for(j in 1:ncol){ print(paste("Alt.1: lattice index [", i,",", j,"] corresponds", "to node [", mapping[i,j],"]", sep="")) } } for (i in 1:nrow){ for(j in 1:ncol){ print(paste("Alt.2: lattice index [", i,",", j,"] corresponds to node [", inla.lattice2node(i,j,nrow,ncol), "]", sep="")) } } inv.mapping = inla.node2lattice.mapping(nrow,ncol) for(node in 1:(nrow*ncol)) print(paste("Alt.1: node [", node, "] corresponds to lattice index [", inv.mapping$irow[node], ",", inv.mapping$icol[node],"]", sep="")) for(node in 1:(nrow*ncol)) print(paste("Alt.2: node [", node, "] corresponds to lattice index [", inla.node2lattice(node,nrow,ncol)$irow[1], ",", inla.node2lattice(node,nrow,ncol)$icol[1],"]", sep="")) ## apply the mapping from matrix to vector and back n = nrow*ncol z = matrix(1:n,nrow,ncol) z.vector = inla.matrix2vector(z) # as.vector(z) could also be used print(mapping) print(z) print(z.vector) ## the vector2matrix is the inverse, and should give us the z-matrix ## back. matrix(z.vector, nrow, ncol) could also be used here. z.matrix = inla.vector2matrix(z.vector, nrow, ncol) print(z.matrix)
This the Leukemia data from Henderson et al (2003); see source.
A data frame with 1043 observations on the following 9 variables.
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
This is the dataset from
Henderson, R. and Shimakura, S. and Gorst, D., 2002, Modeling spatial variation in leukemia survival data, JASA, 97, 460, 965–972.
data(Leuk)
data(Leuk)
inla.mesh.segment
objects. Use
fmesher::lines.fm_segm()
or
fmesher::lines_rgl()
instead.
Draws a inla.mesh.segment()
object with generic or rgl
graphics.
## S3 method for class 'inla.mesh.segment' lines( x, loc = NULL, col = NULL, colors = c("black", "blue", "red", "green"), add = TRUE, xlim = NULL, ylim = NULL, rgl = FALSE, ... )
## S3 method for class 'inla.mesh.segment' lines( x, loc = NULL, col = NULL, colors = c("black", "blue", "red", "green"), add = TRUE, xlim = NULL, ylim = NULL, rgl = FALSE, ... )
x |
An |
loc |
Point locations to be used if |
col |
Segment color specification. |
colors |
Colors to cycle through if |
add |
If |
xlim |
X axis limits for a new plot. |
ylim |
Y axis limits for a new plot. |
rgl |
If |
... |
Additional parameters, passed on to graphics methods. |
Finn Lindgren finn.lindgren@gmail.com
Define link-functions and its inverse
inla.link.cauchit(x, inverse = FALSE) inla.link.invcauchit(x, inverse = FALSE) inla.link.log(x, inverse = FALSE) inla.link.invlog(x, inverse = FALSE) inla.link.neglog(x, inverse = FALSE) inla.link.invneglog(x, inverse = FALSE) inla.link.logit(x, inverse = FALSE) inla.link.invlogit(x, inverse = FALSE) inla.link.probit(x, inverse = FALSE) inla.link.invprobit(x, inverse = FALSE) inla.link.robit(x, df = 7, inverse = FALSE) inla.link.invrobit(x, df = 7, inverse = FALSE) inla.link.loglog(x, inverse = FALSE) inla.link.invloglog(x, inverse = FALSE) inla.link.cloglog(x, inverse = FALSE) inla.link.invcloglog(x, inverse = FALSE) inla.link.ccloglog(x, inverse = FALSE) inla.link.invccloglog(x, inverse = FALSE) inla.link.tan(x, inverse = FALSE) inla.link.invtan(x, inverse = FALSE) inla.link.tan.pi(x, inverse = FALSE) inla.link.invtan.pi(x, inverse = FALSE) inla.link.identity(x, inverse = FALSE) inla.link.invidentity(x, inverse = FALSE) inla.link.inverse(x, inverse = FALSE) inla.link.invinverse(x, inverse = FALSE) inla.link.invqpoisson(x, inverse = FALSE, quantile = 0.5) inla.link.sn(x, intercept = 0.5, skew = 0, a = NULL, inverse = FALSE) inla.link.invsn(x, intercept = 0.5, skew = 0, a = NULL, inverse = FALSE) inla.link.gevit(x, tail = 0.1, inverse = FALSE) inla.link.invgevit(x, tail = 0.1, inverse = FALSE) inla.link.cgevit(x, tail = 0.1, inverse = FALSE) inla.link.invcgevit(x, tail = 0.1, inverse = FALSE) inla.link.invalid(x, inverse = FALSE) inla.link.invinvalid(x, inverse = FALSE)
inla.link.cauchit(x, inverse = FALSE) inla.link.invcauchit(x, inverse = FALSE) inla.link.log(x, inverse = FALSE) inla.link.invlog(x, inverse = FALSE) inla.link.neglog(x, inverse = FALSE) inla.link.invneglog(x, inverse = FALSE) inla.link.logit(x, inverse = FALSE) inla.link.invlogit(x, inverse = FALSE) inla.link.probit(x, inverse = FALSE) inla.link.invprobit(x, inverse = FALSE) inla.link.robit(x, df = 7, inverse = FALSE) inla.link.invrobit(x, df = 7, inverse = FALSE) inla.link.loglog(x, inverse = FALSE) inla.link.invloglog(x, inverse = FALSE) inla.link.cloglog(x, inverse = FALSE) inla.link.invcloglog(x, inverse = FALSE) inla.link.ccloglog(x, inverse = FALSE) inla.link.invccloglog(x, inverse = FALSE) inla.link.tan(x, inverse = FALSE) inla.link.invtan(x, inverse = FALSE) inla.link.tan.pi(x, inverse = FALSE) inla.link.invtan.pi(x, inverse = FALSE) inla.link.identity(x, inverse = FALSE) inla.link.invidentity(x, inverse = FALSE) inla.link.inverse(x, inverse = FALSE) inla.link.invinverse(x, inverse = FALSE) inla.link.invqpoisson(x, inverse = FALSE, quantile = 0.5) inla.link.sn(x, intercept = 0.5, skew = 0, a = NULL, inverse = FALSE) inla.link.invsn(x, intercept = 0.5, skew = 0, a = NULL, inverse = FALSE) inla.link.gevit(x, tail = 0.1, inverse = FALSE) inla.link.invgevit(x, tail = 0.1, inverse = FALSE) inla.link.cgevit(x, tail = 0.1, inverse = FALSE) inla.link.invcgevit(x, tail = 0.1, inverse = FALSE) inla.link.invalid(x, inverse = FALSE) inla.link.invinvalid(x, inverse = FALSE)
x |
The argument. A numeric vector. |
inverse |
Logical. Use the link ( |
df |
The degrees of freedom for the Student-t |
quantile |
The quantile level for quantile links |
intercept |
The quantile level for the intercept in the Skew-Normal link |
skew |
The skewness in the Skew-Normal. Only one of |
a |
The |
tail |
The tail parameter in the GEV distribution (0 < tail <= 1/2) |
Return the values of the link-function or its inverse.
The inv
-functions are redundant, as inla.link.invlog(x) = inla.link.log(x, inverse=TRUE)
and so on, but they are simpler to use as
arguments to other functions.
Havard Rue hrue@r-inla.org
Create a linear combination or several linear combinations, as input to
inla(..., lincomb = <lincomb>)
inla.make.lincomb(...) inla.make.lincombs(...)
inla.make.lincomb(...) inla.make.lincombs(...)
... |
Arguments; see examples |
A structure to be passed on to inla()
argument
lincomb
Havard Rue hrue@r-inla.org
TODO
##See the worked out examples and description in the OLD-FAQ ##vignette {vignette("old-faq", package="INLA")}
##See the worked out examples and description in the OLD-FAQ ##vignette {vignette("old-faq", package="INLA")}
Density, distribution function, quantile function, random generation,
hpd-interval, interpolation, expectations, mode and transformations of
marginals obtained by inla
or inla.hyperpar()
. These
functions computes the density (inla.dmarginal), the distribution function
(inla.pmarginal), the quantile function (inla.qmarginal), random generation
(inla.rmarginal), spline smoothing (inla.smarginal), computes expected
values (inla.emarginal), computes the mode (inla.mmarginal), transforms the
marginal (inla.tmarginal), and provide summary statistics (inla.zmarginal).
inla.smarginal( marginal, log = FALSE, extrapolate = 0, keep.type = FALSE, factor = 15L ) inla.emarginal(fun, marginal, ...) inla.dmarginal(x, marginal, log = FALSE) inla.pmarginal(q, marginal, normalize = TRUE, len = 2048L) inla.qmarginal(p, marginal, len = 2048L) inla.hpdmarginal(p, marginal, len = 2048L) inla.rmarginal(n, marginal) inla.tmarginal( fun, marginal, n = 2048L, h.diff = .Machine[["double.eps"]]^(1/3), method = c("quantile", "linear") ) inla.mmarginal(marginal) inla.zmarginal(marginal, silent = FALSE) inla.is.marginal(marginal)
inla.smarginal( marginal, log = FALSE, extrapolate = 0, keep.type = FALSE, factor = 15L ) inla.emarginal(fun, marginal, ...) inla.dmarginal(x, marginal, log = FALSE) inla.pmarginal(q, marginal, normalize = TRUE, len = 2048L) inla.qmarginal(p, marginal, len = 2048L) inla.hpdmarginal(p, marginal, len = 2048L) inla.rmarginal(n, marginal) inla.tmarginal( fun, marginal, n = 2048L, h.diff = .Machine[["double.eps"]]^(1/3), method = c("quantile", "linear") ) inla.mmarginal(marginal) inla.zmarginal(marginal, silent = FALSE) inla.is.marginal(marginal)
marginal |
A marginal object from either |
log |
Return density or interpolated density in log-scale? |
extrapolate |
How much to extrapolate on each side when computing the interpolation. In fraction of the range. |
keep.type |
If |
factor |
The number of points after interpolation is |
fun |
A (vectorised) function like |
... |
Further arguments to be passed to function which expectation is to be computed. |
x |
Evaluation points |
q |
Quantiles |
normalize |
Renormalise the density after interpolation? |
len |
Number of locations used to interpolate the distribution function. |
p |
Probabilities |
n |
The number of observations. If |
h.diff |
The step-length for the numerical differeniation inside
|
method |
Which method should be used to layout points for where the transformation is computed. |
silent |
Output the result visually (TRUE) or just through the call. |
inla.smarginal
returns list=c(x=c(), y=c())
of
interpolated values do extrapolation using the factor given, and the
remaining function returns what they say they should do.
Havard Rue hrue@r-inla.org
## a simple linear regression example n = 10 x = rnorm(n) sd = 0.1 y = 1+x + rnorm(n,sd=sd) res = inla(y ~ 1 + x, data = data.frame(x,y), control.family=list(initial = log(1/sd^2L),fixed=TRUE)) ## chose a marginal and compare the with the results computed by the ## inla-program r = res$summary.fixed["x",] m = res$marginals.fixed$x ## compute the 95% HPD interval inla.hpdmarginal(0.95, m) x = seq(-6, 6, length.out = 1000) y = dnorm(x) inla.hpdmarginal(0.95, list(x=x, y=y)) ## compute the the density for exp(r), version 1 r.exp = inla.tmarginal(exp, m) ## or version 2 r.exp = inla.tmarginal(function(x) exp(x), m) ## to plot the marginal, we use the inla.smarginal, which interpolates (in ## log-scale). Compare with some samples. plot(inla.smarginal(m), type="l") s = inla.rmarginal(1000, m) hist(inla.rmarginal(1000, m), add=TRUE, prob=TRUE) lines(density(s), lty=2) m1 = inla.emarginal(function(x) x, m) m2 = inla.emarginal(function(x) x^2L, m) stdev = sqrt(m2 - m1^2L) q = inla.qmarginal(c(0.025,0.975), m) ## inla-program results print(r) ## inla.marginal-results (they shouldn't be perfect!) print(c(mean=m1, sd=stdev, "0.025quant" = q[1], "0.975quant" = q[2L])) ## using the buildt-in function inla.zmarginal(m)
## a simple linear regression example n = 10 x = rnorm(n) sd = 0.1 y = 1+x + rnorm(n,sd=sd) res = inla(y ~ 1 + x, data = data.frame(x,y), control.family=list(initial = log(1/sd^2L),fixed=TRUE)) ## chose a marginal and compare the with the results computed by the ## inla-program r = res$summary.fixed["x",] m = res$marginals.fixed$x ## compute the 95% HPD interval inla.hpdmarginal(0.95, m) x = seq(-6, 6, length.out = 1000) y = dnorm(x) inla.hpdmarginal(0.95, list(x=x, y=y)) ## compute the the density for exp(r), version 1 r.exp = inla.tmarginal(exp, m) ## or version 2 r.exp = inla.tmarginal(function(x) exp(x), m) ## to plot the marginal, we use the inla.smarginal, which interpolates (in ## log-scale). Compare with some samples. plot(inla.smarginal(m), type="l") s = inla.rmarginal(1000, m) hist(inla.rmarginal(1000, m), add=TRUE, prob=TRUE) lines(density(s), lty=2) m1 = inla.emarginal(function(x) x, m) m2 = inla.emarginal(function(x) x^2L, m) stdev = sqrt(m2 - m1^2L) q = inla.qmarginal(c(0.025,0.975), m) ## inla-program results print(r) ## inla.marginal-results (they shouldn't be perfect!) print(c(mean=m1, sd=stdev, "0.025quant" = q[1], "0.975quant" = q[2L])) ## using the buildt-in function inla.zmarginal(m)
inla
-objectsThe function merge.inla
implements method merge
for
inla
-objects. merge.inla
is a wrapper for the function
inla.merge
. The interface is slightly different, merge.inla
is
more tailored for interactive use, whereas inla.merge
is better in
general code.
inla.merge
is intented for merging a mixture of inla
-objects,
each run with the same formula and settings, except for a set of
hyperparameters, or other parameters in the model,
that are fixed to different values. Using this function, we
can then integrate over these hyperparameters using (unnormalized)
integration weights prob
. The main objects to be merged, are the
summary statistics and marginal densities (like for hyperparameters, fixed,
random, etc). Not all entries in the object can be merged, and by default
these are inheritated from the first object in the list, while some are just
set to NULL
. Those objectes that are merged, will be listed if run
with option verbose=TRUE
.
Note that merging hyperparameter in the user-scale is prone to discretization error in general, so it is more stable to convert the marginal of the hyperparameter from the merged internal scale to the user-scale. (This is not done by this function.)
## S3 method for class 'inla' merge(x, y, ..., prob = rep(1, length(list(x, y, ...))), verbose = FALSE) inla.merge(loo, prob = rep(1, length(loo)), mc.cores = NULL, verbose = FALSE)
## S3 method for class 'inla' merge(x, y, ..., prob = rep(1, length(list(x, y, ...))), verbose = FALSE) inla.merge(loo, prob = rep(1, length(loo)), mc.cores = NULL, verbose = FALSE)
x |
An |
y |
An |
... |
Additional |
prob |
The mixture of (possibly unnormalized) probabilities |
verbose |
Turn on verbose-output or not |
loo |
List of |
mc.cores |
The number of cores to use in |
A merged inla
-object.
Havard Rue hrue@r-inla.org
set.seed(123) n = 100 y = rnorm(n) y[1:10] = NA x = rnorm(n) z1 = runif(n) z2 = runif(n)*n idx = 1:n idx2 = 1:n lc1 = inla.make.lincomb(idx = c(1, 2, 3)) names(lc1) = "lc1" lc2 = inla.make.lincomb(idx = c(0, 1, 2, 3)) names(lc2) = "lc2" lc3 = inla.make.lincomb(idx = c(0, 0, 1, 2, 3)) names(lc3) = "lc3" lc = c(lc1, lc2, lc3) rr = list() for (logprec in c(0, 1, 2)) rr[[length(rr)+1]] = inla(y ~ 1 + x + f(idx, z1) + f(idx2, z2), lincomb = lc, control.family = list(hyper = list(prec = list(initial = logprec))), control.predictor = list(compute = TRUE, link = 1), data = data.frame(y, x, idx, idx2, z1, z2)) r = inla.merge(rr, prob = seq_along(rr), verbose=TRUE) summary(r)
set.seed(123) n = 100 y = rnorm(n) y[1:10] = NA x = rnorm(n) z1 = runif(n) z2 = runif(n)*n idx = 1:n idx2 = 1:n lc1 = inla.make.lincomb(idx = c(1, 2, 3)) names(lc1) = "lc1" lc2 = inla.make.lincomb(idx = c(0, 1, 2, 3)) names(lc2) = "lc2" lc3 = inla.make.lincomb(idx = c(0, 0, 1, 2, 3)) names(lc3) = "lc3" lc = c(lc1, lc2, lc3) rr = list() for (logprec in c(0, 1, 2)) rr[[length(rr)+1]] = inla(y ~ 1 + x + f(idx, z1) + f(idx2, z2), lincomb = lc, control.family = list(hyper = list(prec = list(initial = logprec))), control.predictor = list(compute = TRUE, link = 1), data = data.frame(y, x, idx, idx2, z1, z2)) r = inla.merge(rr, prob = seq_along(rr), verbose=TRUE) summary(r)
Interactively design and build a triangle mesh for use with SPDE models, and assess the finite element approximation errors. The R code needed to recreate the mesh outside the interactive Shiny app is also generated. Spatial objects can be imported from the global workspace.
meshbuilder()
meshbuilder()
Finn Lindgren finn.lindgren@gmail.com
inla.mesh.2d()
, inla.mesh.create()
## Not run: meshbuilder() ## End(Not run)
## Not run: meshbuilder() ## End(Not run)
The Munich rent data
A data frame with 2035 observations on the following 17 variables.
Net rent per square meter.
Size of the flat in square meters.
Year of construction of the building in which the flat is located.
Location index (in terms of subquarters).
Dummy variable for good locations / good neighborhoods.
Dummy variable for very good locations / very good neighborhoods.
Dummy for absence of warm water supply.
Dummy for absence of central heating system.
Dummy for absence of flagging in the bathroom.
Dummy for special features of the bathroom.
Dummy for more refined kitchen equipment.
Dummy for a flat with 1 room.
Dummy for a flat with 2 rooms.
Dummy for a flat with 3 rooms.
Dummy for a flat with 4 rooms.
Dummy for a flat with 5 rooms.
Dummy for a flat with 6 rooms.
See Rue and Held (2005), Chapter 4.
Rue, H and Held, L. (2005) Gaussian Markov Random Fields - Theory and Applications Chapman and Hall
This map is used in association to the Leukemia data from Henderson et al (2003); see source.
A SpatialPolygons object.
This map are used to analyse the Leukaemia dataset from
Henderson, R. and Shimakura, S. and Gorst, D., 2002, Modeling spatial variation in leukemia survival data, JASA, 97, 460, 965–972.
data(Leuk) plot(nwEngland)
data(Leuk) plot(nwEngland)
~~ A concise (1-5 lines) description of the dataset. ~~
A data frame with 544 observations on the following 3 variables.
a numeric vector
a numeric vector
a numeric vector
Rue, H and Held, L. (2005) Gaussian Markov Random Fields - Theory and Applications Chapman and Hall
inla.spde2.matern
models.Construct parameter settings for inla.spde2.matern
models.
param2.matern.orig( mesh, alpha = 2, B.tau = matrix(c(0, 1, 0), 1, 3), B.kappa = matrix(c(0, 0, 1), 1, 3), prior.variance.nominal = 1, prior.range.nominal = NULL, prior.tau = NULL, prior.kappa = NULL, theta.prior.mean = NULL, theta.prior.prec = 0.1 )
param2.matern.orig( mesh, alpha = 2, B.tau = matrix(c(0, 1, 0), 1, 3), B.kappa = matrix(c(0, 0, 1), 1, 3), prior.variance.nominal = 1, prior.range.nominal = NULL, prior.tau = NULL, prior.kappa = NULL, theta.prior.mean = NULL, theta.prior.prec = 0.1 )
mesh |
The mesh to build the model on, as an |
alpha |
Fractional operator order, |
B.tau |
Matrix with specification of log-linear model for |
B.kappa |
Matrix with specification of log-linear model for
|
prior.variance.nominal |
Nominal prior mean for the field variance |
prior.range.nominal |
Nominal prior mean for the spatial range |
prior.tau |
Prior mean for tau (overrides
|
prior.kappa |
Prior mean for kappa (overrides
|
theta.prior.mean |
(overrides |
theta.prior.prec |
Scalar, vector or matrix, specifying the joint prior
precision for |
Finn Lindgren finn.lindgren@gmail.com
inla.pardiso()
describes the PARDISO
support in R-INLA, how to
get the license key and enable it in the R-INLA
package.
inla.pardiso.check()
check if the PARDISO
support is working.
inla.pardiso() inla.pardiso.check()
inla.pardiso() inla.pardiso.check()
Havard Rue hrue@r-inla.org
alpha
parameter in the
Weibull likelihoodFunctions to evaluate, sample, compute quantiles and percentiles of the PC
prior for the alpha
parameter in the Weibull likelihood
inla.pc.ralphaw(n, lambda = 5) inla.pc.dalphaw(alpha, lambda = 5, log = FALSE) inla.pc.qalphaw(p, lambda = 5) inla.pc.palphaw(q, lambda = 5)
inla.pc.ralphaw(n, lambda = 5) inla.pc.dalphaw(alpha, lambda = 5, log = FALSE) inla.pc.qalphaw(p, lambda = 5) inla.pc.palphaw(q, lambda = 5)
n |
Number of observations |
lambda |
The rate parameter in the PC-prior |
alpha |
Vector of evaluation points, where |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
This gives the PC prior for the alpha
parameter for the Weibull
likelihood, where alpha=1
is the base model.
inla.pc.dalphaw
gives the density, inla.pc.palphaw
gives the distribution function, inla.pc.qalphaw
gives the quantile
function, and inla.pc.ralphaw
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.alphaw")
x = inla.pc.ralphaw(100, lambda = 5) d = inla.pc.dalphaw(x, lambda = 5) x = inla.pc.qalphaw(0.5, lambda = 5) inla.pc.palphaw(x, lambda = 5)
x = inla.pc.ralphaw(100, lambda = 5) d = inla.pc.dalphaw(x, lambda = 5) x = inla.pc.qalphaw(0.5, lambda = 5) inla.pc.palphaw(x, lambda = 5)
Functions to evaluate and sample from the PC prior for an AR(p) model
inla.pc.ar.rpacf(n = 1, p, lambda = 1) inla.pc.ar.dpacf(pac, lambda = 1, log = TRUE)
inla.pc.ar.rpacf(n = 1, p, lambda = 1) inla.pc.ar.dpacf(pac, lambda = 1, log = TRUE)
n |
Number of observations |
p |
The order of the AR-model |
lambda |
The rate parameter in the prior |
pac |
A vector of partial autocorrelation coefficients |
log |
Logical. Return the density in natural or log-scale. |
inla.pc.ar.rpac
generate samples from the prior, returning
a matrix where each row is a sample of theta
. inla.pc.ar.dpac
evaluates the density of pac
. Use inla.ar.pacf2phi
,
inla.ar.phi2pacf
, inla.ar.pacf2acf
and inla.ar.acf2pacf
to convert between various parameterisations.
Havard Rue hrue@r-inla.org
Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for the correlation in the Gaussian AR(1) model where the base-model is zero correlation.
inla.pc.rcor0(n, u, alpha, lambda) inla.pc.dcor0(cor, u, alpha, lambda, log = FALSE) inla.pc.qcor0(p, u, alpha, lambda) inla.pc.pcor0(q, u, alpha, lambda)
inla.pc.rcor0(n, u, alpha, lambda) inla.pc.dcor0(cor, u, alpha, lambda, log = FALSE) inla.pc.qcor0(p, u, alpha, lambda) inla.pc.pcor0(q, u, alpha, lambda)
n |
Number of observations |
u |
The upper limit (see Details) |
alpha |
The probability going above the upper limit (see Details) |
lambda |
The rate parameter (see Details) |
cor |
Vector of correlations |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
The statement Prob(|cor| > u) = alpha
is used to determine
lambda
unless lambda
is given. Either lambda
must be
given, or u
AND alpha
. The density is symmetric around zero.
inla.pc.dcor0
gives the density, inla.pc.pcor0
gives the distribution function, inla.pc.qcor0
gives the quantile
function, and inla.pc.rcor0
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.rho0")
cor = inla.pc.rcor0(100, lambda = 1) d = inla.pc.dcor0(cor, lambda = 1) cor = inla.pc.qcor0(c(0.3, 0.7), u = 0.5, alpha=0.01) inla.pc.pcor0(cor, u = 0.5, alpha=0.01)
cor = inla.pc.rcor0(100, lambda = 1) d = inla.pc.dcor0(cor, lambda = 1) cor = inla.pc.qcor0(c(0.3, 0.7), u = 0.5, alpha=0.01) inla.pc.pcor0(cor, u = 0.5, alpha=0.01)
Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for the correlation in the Gaussian AR(1) model where the base-model is correlation one.
inla.pc.rcor1(n, u, alpha, lambda) inla.pc.dcor1(cor, u, alpha, lambda, log = FALSE) inla.pc.qcor1(p, u, alpha, lambda) inla.pc.pcor1(q, u, alpha, lambda)
inla.pc.rcor1(n, u, alpha, lambda) inla.pc.dcor1(cor, u, alpha, lambda, log = FALSE) inla.pc.qcor1(p, u, alpha, lambda) inla.pc.pcor1(q, u, alpha, lambda)
n |
Number of observations |
u |
The upper limit (see Details) |
alpha |
The probability going above the upper limit (see Details) |
lambda |
The rate parameter (see Details) |
cor |
Vector of correlations |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
The statement Prob(cor > u) = alpha
is used to determine
lambda
unless lambda
is given. Either lambda
must be
given, or u
AND alpha
.
inla.pc.dcor1
gives the density, inla.pc.pcor1
gives the distribution function, inla.pc.qcor1
gives the quantile
function, and inla.pc.rcor1
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.rho1")
cor = inla.pc.rcor1(100, lambda = 1) d = inla.pc.dcor1(cor, lambda = 1) cor = inla.pc.qcor1(c(0.3, 0.7), u = 0.5, alpha=0.75) inla.pc.pcor1(cor, u = 0.5, alpha=0.75)
cor = inla.pc.rcor1(100, lambda = 1) d = inla.pc.dcor1(cor, lambda = 1) cor = inla.pc.qcor1(c(0.3, 0.7), u = 0.5, alpha=0.75) inla.pc.pcor1(cor, u = 0.5, alpha=0.75)
Functions to evaluate and sample from the PC prior for a correlation matrix.
The parameterisation of a correlation matrix of dimension p
has
dim
parameters: theta
which are in the interval -pi to pi.
The alternative parameterisation is through the off-diagonal elements
r
of the correlation matrix R
. The functions
inla.pc.cormat.<A>2<B>
convert between parameterisations <A>
to parameterisations <B>
, where both <A>
and <B>
are
one of theta
, r
and R
, and p
and dim
.
inla.pc.cormat.dim2p(dim) inla.pc.cormat.p2dim(p) inla.pc.cormat.theta2R(theta) inla.pc.cormat.R2theta(R) inla.pc.cormat.r2R(r) inla.pc.cormat.R2r(R) inla.pc.cormat.r2theta(r) inla.pc.cormat.theta2r(theta) inla.pc.cormat.permute(R) inla.pc.cormat.rtheta(n = 1, p, lambda = 1) inla.pc.cormat.dtheta(theta, lambda = 1, log = FALSE)
inla.pc.cormat.dim2p(dim) inla.pc.cormat.p2dim(p) inla.pc.cormat.theta2R(theta) inla.pc.cormat.R2theta(R) inla.pc.cormat.r2R(r) inla.pc.cormat.R2r(R) inla.pc.cormat.r2theta(r) inla.pc.cormat.theta2r(theta) inla.pc.cormat.permute(R) inla.pc.cormat.rtheta(n = 1, p, lambda = 1) inla.pc.cormat.dtheta(theta, lambda = 1, log = FALSE)
dim |
The dimension of |
p |
The dimension the correlation matrix |
theta |
A vector of parameters for the correlation matrix |
R |
A correlation matrix |
r |
The off diagonal elements of a correlation matrix |
n |
Number of observations |
lambda |
The rate parameter in the prior |
log |
Logical. Return the density in natural or log-scale. |
inla.pc.cormat.rtheta
generate samples from the prior,
returning a matrix where each row is a sample of theta
.
inla.pc.cormat.dtheta
evaluates the density of theta
.
inla.pc.cormat.permute
randomly permutes a correlation matrix, which
is useful if an exchangable sample of a correlation matrix is required.
Havard Rue hrue@r-inla.org
p = 4 print(paste("theta has length", inla.pc.cormat.p2dim(p))) theta = inla.pc.cormat.rtheta(n=1, p=4, lambda = 1) print("sample theta:") print(theta) print(paste("log.dens", inla.pc.cormat.dtheta(theta, log=TRUE))) print("r:") r = inla.pc.cormat.theta2r(theta) print(r) print("A sample from the non-exchangable prior, R:") R = inla.pc.cormat.r2R(r) print(R) print("A sample from the exchangable prior, R:") R = inla.pc.cormat.permute(R) print(R)
p = 4 print(paste("theta has length", inla.pc.cormat.p2dim(p))) theta = inla.pc.cormat.rtheta(n=1, p=4, lambda = 1) print("sample theta:") print(theta) print(paste("log.dens", inla.pc.cormat.dtheta(theta, log=TRUE))) print("r:") r = inla.pc.cormat.theta2r(theta) print(r) print("A sample from the non-exchangable prior, R:") R = inla.pc.cormat.r2R(r) print(R) print("A sample from the exchangable prior, R:") R = inla.pc.cormat.permute(R) print(R)
A function to evaluate the PC-prior for the degrees of freedom in a standardized Student-t distribution
inla.pc.ddof(dof, lambda, u, alpha, log = FALSE)
inla.pc.ddof(dof, lambda, u, alpha, log = FALSE)
dof |
Degrees of freedom |
lambda |
The optional value of |
u |
The upper value of dof used to elicitate |
alpha |
The probability |
log |
Logical. Return the density or the log-density |
These functions implements the PC-prior for the dof in a standardized
Student-t distribution (ie. with unit variance and dof
> 2). Either
lambda
, or u
AND alpha
must be given. Due the internal
tabulation, dof
must be larger than 2.0025.
inla.pc.ddof
returns the prior density for given
dof
.
Havard Rue hrue@r-inla.org
Gamma(1/a, 1/a)
Functions to evaluate, sample, compute quantiles and percentiles of the PC
prior for Gamma(1/a, 1/a)
inla.pc.rgamma(n, lambda = 1) inla.pc.dgamma(x, lambda = 1, log = FALSE) inla.pc.qgamma(p, lambda = 1) inla.pc.pgamma(q, lambda = 1)
inla.pc.rgamma(n, lambda = 1) inla.pc.dgamma(x, lambda = 1, log = FALSE) inla.pc.qgamma(p, lambda = 1) inla.pc.pgamma(q, lambda = 1)
n |
Number of observations |
lambda |
The rate parameter (see Details) |
x |
Evaluation points |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
This gives the PC prior for the Gamma(1/a, 1/a)
case, where
a=0
is the base model.
inla.pc.dgamma
gives the density, inla.pc.pgamma
gives the distribution function, inla.pc.qgamma
gives the quantile
function, and inla.pc.rgamma
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.gamma")
x = inla.pc.rgamma(100, lambda = 1) d = inla.pc.dgamma(x, lambda = 1) x = inla.pc.qgamma(0.5, lambda = 1) inla.pc.pgamma(x, lambda = 1)
x = inla.pc.rgamma(100, lambda = 1) d = inla.pc.dgamma(x, lambda = 1) x = inla.pc.qgamma(0.5, lambda = 1) inla.pc.pgamma(x, lambda = 1)
gammacount
likelihoodFunctions to evaluate, sample, compute quantiles and percentiles of the PC
prior for the gammacount
likelihood
inla.pc.rgammacount(n, lambda = 1) inla.pc.dgammacount(x, lambda = 1, log = FALSE) inla.pc.qgammacount(p, lambda = 1) inla.pc.pgammacount(q, lambda = 1)
inla.pc.rgammacount(n, lambda = 1) inla.pc.dgammacount(x, lambda = 1, log = FALSE) inla.pc.qgammacount(p, lambda = 1) inla.pc.pgammacount(q, lambda = 1)
n |
Number of observations |
lambda |
The rate parameter (see Details) |
x |
Evaluation points |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
This gives the PC prior for the gammacount
likelihood, which is the
PC prior for a
in Gamma(a, 1)
where Gamma(1, 1)
is the
base model.
inla.pc.dgammacount
gives the density,
inla.pc.pgammacount
gives the distribution function,
inla.pc.qgammacount
gives the quantile function, and
inla.pc.rgammacount
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.gammacount")
x = inla.pc.rgammacount(100, lambda = 1) d = inla.pc.dgammacount(x, lambda = 1) x = inla.pc.qgammacount(0.5, lambda = 1) inla.pc.pgammacount(x, lambda = 1)
x = inla.pc.rgammacount(100, lambda = 1) d = inla.pc.dgammacount(x, lambda = 1) x = inla.pc.qgammacount(0.5, lambda = 1) inla.pc.pgammacount(x, lambda = 1)
tail
parameter in the GEV
likelihoodFunctions to evaluate, sample, compute quantiles and percentiles of the PC
prior for the tail
parameter in the GEV likelihood
inla.pc.rgevtail(n, lambda = 7) inla.pc.dgevtail(xi, lambda = 7, log = FALSE) inla.pc.qgevtail(p, lambda = 7) inla.pc.pgevtail(q, lambda = 7)
inla.pc.rgevtail(n, lambda = 7) inla.pc.dgevtail(xi, lambda = 7, log = FALSE) inla.pc.qgevtail(p, lambda = 7) inla.pc.pgevtail(q, lambda = 7)
n |
Number of observations |
lambda |
The rate parameter in the PC-prior |
xi |
Vector of evaluation points, where |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
This gives the PC prior for the tail
parameter for the GEV
likelihood, where xi=0
is the base model.
inla.pc.dgevtail
gives the density,
inla.pc.pgevtail
gives the distribution function,
inla.pc.qgevtail
gives the quantile function, and
inla.pc.rgevtail
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.gevtail")
xi = inla.pc.rgevtail(100, lambda = 7) d = inla.pc.dgevtail(xi, lambda = 7) xi = inla.pc.qgevtail(0.5, lambda = 7) inla.pc.pgevtail(xi, lambda = 7)
xi = inla.pc.rgevtail(100, lambda = 7) d = inla.pc.dgevtail(xi, lambda = 7) xi = inla.pc.qgevtail(0.5, lambda = 7) inla.pc.pgevtail(xi, lambda = 7)
Functions to evaluate and simulate from multivariate PC priors: The simplex and sphere case
inla.pc.multvar.h.default(x, inverse = FALSE, derivative = FALSE) inla.pc.multvar.simplex.r( n = NULL, lambda = 1, h = inla.pc.multvar.h.default, b = NULL ) inla.pc.multvar.simplex.d( x = NULL, lambda = 1, log = FALSE, h = inla.pc.multvar.h.default, b = NULL ) inla.pc.multvar.sphere.r( n = NULL, lambda = 1, h = inla.pc.multvar.h.default, H = NULL ) inla.pc.multvar.sphere.d( x = NULL, lambda = 1, log = FALSE, h = inla.pc.multvar.h.default, H = NULL )
inla.pc.multvar.h.default(x, inverse = FALSE, derivative = FALSE) inla.pc.multvar.simplex.r( n = NULL, lambda = 1, h = inla.pc.multvar.h.default, b = NULL ) inla.pc.multvar.simplex.d( x = NULL, lambda = 1, log = FALSE, h = inla.pc.multvar.h.default, b = NULL ) inla.pc.multvar.sphere.r( n = NULL, lambda = 1, h = inla.pc.multvar.h.default, H = NULL ) inla.pc.multvar.sphere.d( x = NULL, lambda = 1, log = FALSE, h = inla.pc.multvar.h.default, H = NULL )
x |
Samples to evaluate. If input is a matrix then each row is a sample. If input is a vector then this is the sample. |
inverse |
Compute the inverse of the h()-function. |
derivative |
Compute the derivative of the h()-function. (derivative of the inverse function is not used). |
n |
Number of samples to generate. |
lambda |
The lambda-parameter in the PC-prior. |
h |
The h()-function, defaults to |
b |
The b-vector (gradient) in the expression for the simplex option,
|
log |
Evaluate the density in log-scale or ordinary scale. |
H |
The H(essian)-matrix in the expression for the sphere option,
|
These functions implements multivariate PC-priors of the simplex and sphere type.
inla.pc.multvar.simplex.r
generate samples from the
simplex case, and inla.pc.multvar.simplex.d
evaluate the density.
inla.pc.multvar.sphere.r
generate samples from the sphere case, and
inla.pc.multvar.sphere.d
evaluate the density.
inla.pc.multvar.h.default
implements the default h()-function and
illustrate how to code your own specific one, if needed.
Havard Rue hrue@r-inla.org
Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for the precision in the Gaussian distribution.
inla.pc.rprec(n, u, alpha, lambda) inla.pc.dprec(prec, u, alpha, lambda, log = FALSE) inla.pc.qprec(p, u, alpha, lambda) inla.pc.pprec(q, u, alpha, lambda)
inla.pc.rprec(n, u, alpha, lambda) inla.pc.dprec(prec, u, alpha, lambda, log = FALSE) inla.pc.qprec(p, u, alpha, lambda) inla.pc.pprec(q, u, alpha, lambda)
n |
Number of observations |
u |
The upper limit (see Details) |
alpha |
The probability going above the upper limit (see Details) |
lambda |
The rate parameter (see Details) |
prec |
Vector of precisions |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
The statement Prob(1/sqrt(prec) > u) = alpha
is used to determine
lambda
unless lambda
is given. Either lambda
must be
given, or u
AND alpha
.
inla.pc.dprec
gives the density, inla.pc.pprec
gives the distribution function, inla.pc.qprec
gives the quantile
function, and inla.pc.rprec
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.prec")
prec = inla.pc.rprec(100, lambda = 1) d = inla.pc.dprec(prec, lambda = 1) prec = inla.pc.qprec(0.5, u = 1, alpha=0.01) inla.pc.pprec(prec, u = 1, alpha=0.01)
prec = inla.pc.rprec(100, lambda = 1) d = inla.pc.dprec(prec, lambda = 1) prec = inla.pc.qprec(0.5, u = 1, alpha=0.01) inla.pc.pprec(prec, u = 1, alpha=0.01)
skewness
in the skew-normal
linkfunction and likelihoodFunctions to evaluate, sample, compute quantiles and percentiles of the PC
prior for the skewness
in the skew-normal link-function and
likelihood
inla.pc.rsn(n, lambda = 40) inla.pc.dsn(skew, lambda = 40, log = FALSE) inla.pc.qsn(p, lambda = 40) inla.pc.psn(q, lambda = 40)
inla.pc.rsn(n, lambda = 40) inla.pc.dsn(skew, lambda = 40, log = FALSE) inla.pc.qsn(p, lambda = 40) inla.pc.psn(q, lambda = 40)
n |
number of observations |
lambda |
the rate parameter in the PC prior |
skew |
vector of evaluation points |
log |
logical. return the density in natural or log-scale. |
p |
vector of probabilities |
q |
vector of quantiles |
Defines the PC prior for the skewness
for the skew-normal
linkfunction and likelihood, where skew=0
is the base model. The
skewness range from -0.99527... to 0.99527.... ca.
inla.pc.dsn
gives the density, inla.pc.psn
gives
the distribution function, inla.pc.qsn
gives the quantile function,
and inla.pc.rsn
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.sn")
x = inla.pc.rsn(100, lambda = 40) d = inla.pc.dsn(x, lambda = 40) x = inla.pc.qsn(0.5, lambda = 40) inla.pc.psn(x, lambda = 40)
x = inla.pc.rsn(100, lambda = 40) d = inla.pc.dsn(x, lambda = 40) x = inla.pc.qsn(0.5, lambda = 40) inla.pc.psn(x, lambda = 40)
Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for the precision in the Gaussian distribution.
inla.pc.rvm0(n, u, alpha, lambda) inla.pc.dvm0(k, u, alpha, lambda, log = FALSE) inla.pc.qvm0(p, u, alpha, lambda, len = 2048L) inla.pc.pvm0(q, u, alpha, lambda, log = FALSE)
inla.pc.rvm0(n, u, alpha, lambda) inla.pc.dvm0(k, u, alpha, lambda, log = FALSE) inla.pc.qvm0(p, u, alpha, lambda, len = 2048L) inla.pc.pvm0(q, u, alpha, lambda, log = FALSE)
n |
Number of observations |
u |
The upper limit (0 < u < 2*pi). The small values of u indicate a high concentration to a point mass, whilst large values of u mean that the user believes the data spread widely. |
alpha |
The probability going above the upper limit (the probability assigned to the event Prob(2*pi/(1+k) > u)). |
lambda |
The rate parameter (see Details) |
k |
The concentration of von Mises distribution |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
The statement Prob(2*pi/(1+k) > u) = alpha
is used to determine
lambda
unless lambda
is given. Either lambda
must be
given, or u
AND alpha
.
Due to limitations in handling extreme values for special functions, the output of these functions may exhibit bias when the input parameter values are either excessively large or very close to zero.
inla.pc.dvm0
gives the density, inla.pc.pvm0
gives the distribution function, inla.pc.qvm0
gives the quantile
function, and inla.pc.rvm0
generates random deviates.
Xiang Ye xiang.ye@kaust.edu.sa
inla.doc("pc.vm0")
k = inla.pc.rvm0(100, lambda = 1) d = inla.pc.dvm0(1, lambda = 1) k = inla.pc.qvm0(0.5, u = 1, alpha=0.01) inla.pc.pvm0(5, u = 1, alpha=0.01)
k = inla.pc.rvm0(100, lambda = 1) d = inla.pc.dvm0(1, lambda = 1) k = inla.pc.qvm0(0.5, u = 1, alpha=0.01) inla.pc.pvm0(5, u = 1, alpha=0.01)
Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for the concentration in the von Mises distribution.
inla.pc.rvminf(n, u, alpha, lambda) inla.pc.dvminf(k, u, alpha, lambda, log = FALSE) inla.pc.qvminf(p, u, alpha, lambda, len = 2048L) inla.pc.pvminf(q, u, alpha, lambda, log = FALSE)
inla.pc.rvminf(n, u, alpha, lambda) inla.pc.dvminf(k, u, alpha, lambda, log = FALSE) inla.pc.qvminf(p, u, alpha, lambda, len = 2048L) inla.pc.pvminf(q, u, alpha, lambda, log = FALSE)
n |
Number of observations |
u |
The upper limit (0 < u < 2*pi). The small values of u indicate a high concentration to a point mass, whilst large values of u mean that the user believes the data spread widely. |
alpha |
The probability going above the upper limit (the probability assigned to the event Prob(2*pi/(1+k) > u)). |
lambda |
The rate parameter. |
k |
The concentration of von Mises distribution |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities. |
q |
Vector of quantiles. |
The statement Prob(2*pi/(1+k) > u) = alpha
is used to determine lambda
unless lambda
is
given. Either lambda
must be given, or u
AND alpha
.
Due to limitations in handling extreme values for special functions, the output of these functions may exhibit bias when the input parameter values are either excessively large or very close to zero.
inla.pc.dvminf
gives the density, inla.pc.pvminf
gives the distribution function, inla.pc.qvminf
gives the quantile
function, and inla.pc.rvminf
generates random deviates.
Xiang Ye xiang.ye@kaust.edu.sa
inla.doc("pc.vminf")
k = inla.pc.rvminf(100, lambda = 1) d = inla.pc.dvminf(1, lambda = 1) k = inla.pc.qvminf(0.5, u = 1, alpha=0.01) inla.pc.pvminf(5, u = 1, alpha=0.01)
k = inla.pc.rvminf(100, lambda = 1) d = inla.pc.dvminf(1, lambda = 1) k = inla.pc.qvminf(0.5, u = 1, alpha=0.01) inla.pc.pvminf(5, u = 1, alpha=0.01)
Takes an inla
object produced by inla
and plot the results
## S3 method for class 'inla' plot( x, plot.fixed.effects = TRUE, plot.lincomb = TRUE, plot.random.effects = TRUE, plot.hyperparameters = TRUE, plot.predictor = TRUE, plot.q = TRUE, plot.cpo = TRUE, plot.prior = FALSE, plot.opt.trace = FALSE, single = FALSE, postscript = FALSE, pdf = FALSE, prefix = "inla.plots/figure-", intern = FALSE, debug = FALSE, cex = 1.75, ... )
## S3 method for class 'inla' plot( x, plot.fixed.effects = TRUE, plot.lincomb = TRUE, plot.random.effects = TRUE, plot.hyperparameters = TRUE, plot.predictor = TRUE, plot.q = TRUE, plot.cpo = TRUE, plot.prior = FALSE, plot.opt.trace = FALSE, single = FALSE, postscript = FALSE, pdf = FALSE, prefix = "inla.plots/figure-", intern = FALSE, debug = FALSE, cex = 1.75, ... )
x |
A fitted |
plot.fixed.effects |
Boolean indicating if posterior marginals for the fixed effects in the model should be plotted |
plot.lincomb |
Boolean indicating if posterior marginals for the linear combinations should be plotted |
plot.random.effects |
Boolean indicating if posterior mean and quantiles for the random effects in the model should be plotted |
plot.hyperparameters |
Boolean indicating if posterior marginals for the hyperparameters in the model should be plotted |
plot.predictor |
Boolean indicating if posterior mean and quantiles for the linear predictor in the model should be plotted |
plot.q |
Boolean indicating if precision matrix should be displayed |
plot.cpo |
Boolean indicating if CPO/PIT valuesshould be plotted |
plot.prior |
Plot also the prior density for the hyperparameters |
plot.opt.trace |
Plot optimization trace |
single |
Boolean indicating if there should be more than one plot per page (FALSE) or just one (TRUE) |
postscript |
Boolean indicating if postscript files should be produced instead |
pdf |
Boolean indicating if PDF files should be produced instead |
prefix |
The prefix for the created files. Additional numbering and suffix is added. |
intern |
Plot also the hyperparameters in its internal scale. |
debug |
Write some debug information |
cex |
The |
... |
Additional arguments to |
The return value is a list of the files created (if any).
Havard Rue hrue@r-inla.org
## Not run: result = inla(...) plot(result) plot(result, single = TRUE, plot.prior = TRUE) plot(result, single = TRUE, pdf = TRUE, paper = "a4") ## End(Not run)
## Not run: result = inla(...) plot(result) plot(result, single = TRUE, plot.prior = TRUE) plot(result, single = TRUE, pdf = TRUE, paper = "a4") ## End(Not run)
Use
fmesher::plot.fm_mesh_2d()
or
fmesher::plot_rgl()
instead.
Plots an inla.mesh()
object using either standard graphics or
with rgl
.
## S3 method for class 'inla.mesh' plot( x, col = "white", t.sub = 1:nrow(mesh$graph$tv), add = FALSE, lwd = 1, xlim = range(mesh$loc[, 1]), ylim = range(mesh$loc[, 2]), main = NULL, rgl = FALSE, size = 2, draw.vertices = FALSE, vertex.color = "black", draw.edges = TRUE, edge.color = rgb(0.3, 0.3, 0.3), draw.segments = draw.edges, ... )
## S3 method for class 'inla.mesh' plot( x, col = "white", t.sub = 1:nrow(mesh$graph$tv), add = FALSE, lwd = 1, xlim = range(mesh$loc[, 1]), ylim = range(mesh$loc[, 2]), main = NULL, rgl = FALSE, size = 2, draw.vertices = FALSE, vertex.color = "black", draw.edges = TRUE, edge.color = rgb(0.3, 0.3, 0.3), draw.segments = draw.edges, ... )
x |
An |
col |
Color specification. A single named color, a vector of scalar
values, or a matrix of RGB values. Requires |
t.sub |
Optional triangle index subset to be drawn. |
add |
If |
lwd |
Line width for triangle edges. |
xlim |
X-axis limits. |
ylim |
Y-axis limits. |
main |
The main plot title. If not specified, a default title is generated based on the mesh type. |
rgl |
When |
size |
Size of vertex points in |
draw.vertices |
If |
vertex.color |
Color specification for all vertices. |
draw.edges |
If |
edge.color |
Color specification for all edges. |
draw.segments |
If |
... |
Further graphics parameters, interpreted by the respective plotting systems. |
Finn Lindgren finn.lindgren@gmail.com
mesh <- inla.mesh.create(globe = 10) plot(mesh) if (require(rgl)) { plot(mesh, rgl = TRUE, col = mesh$loc[, 1]) }
mesh <- inla.mesh.create(globe = 10) plot(mesh) if (require(rgl)) { plot(mesh, rgl = TRUE, col = mesh$loc[, 1]) }
Use
fmesher::plot_rgl()
instead.
Plots a triangulation mesh using rgl
.
## S3 method for class 'inla.trimesh' plot( x, S, color = NULL, color.axis = NULL, color.n = 512, color.palette = cm.colors, color.truncate = FALSE, alpha = NULL, lwd = 1, specular = "black", draw.vertices = TRUE, draw.edges = TRUE, edge.color = rgb(0.3, 0.3, 0.3), ... )
## S3 method for class 'inla.trimesh' plot( x, S, color = NULL, color.axis = NULL, color.n = 512, color.palette = cm.colors, color.truncate = FALSE, alpha = NULL, lwd = 1, specular = "black", draw.vertices = TRUE, draw.edges = TRUE, edge.color = rgb(0.3, 0.3, 0.3), ... )
x |
A 3-column triangle-to-vertex index map matrix. |
S |
A 3-column vertex coordinate matrix. |
color |
Color specification. A single named color, a vector of scalar values, or a matrix of RGB values. |
color.axis |
The min/max limit values for the color mapping. |
color.n |
The number of colors to use in the color palette. |
color.palette |
A color palette function. |
color.truncate |
If |
alpha |
Transparency/opaqueness values. See |
lwd |
Line width for edges. See |
specular |
Specular color. See |
draw.vertices |
If |
draw.edges |
If |
edge.color |
Edge color specification. |
... |
Additional parameters passed to and from other methods. |
Finn Lindgren finn.lindgren@gmail.com
A data matrix with Longitude and Latitude coordinates for the boundary of Parana State.
The Longtiude coordinate
The Latitude coordinate
PRprec
Print an INLA fit
## S3 method for class 'inla' print(x, digits = 3L, ...)
## S3 method for class 'inla' print(x, digits = 3L, ...)
x |
An inla-object (output from an |
digits |
Number of digits to print |
... |
other arguments. |
None
Havard Rue
A data frame with daily rainfall in the Parana State.
A data frame .... TODO
TODO
TODO
TODO
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
Daily rainfall at day "mmdd"
PRborder
This routine use the GMRFLib implementation which compute parts of the inverse of a SPD sparse matrix. The diagonal and values for the neighbours in the inverse, are provided.
inla.qinv(Q, constr, reordering = INLA::inla.reorderings(), num.threads = NULL)
inla.qinv(Q, constr, reordering = INLA::inla.reorderings(), num.threads = NULL)
Q |
A SPD matrix, either as a (dense) matrix or sparseMatrix. |
constr |
Optional linear constraints; see |
reordering |
The type of reordering algorithm to be used for
|
num.threads |
Maximum number of threads the |
inla.qinv
returns a sparseMatrix
of type
dgTMatrix
with the diagonal and values for the neigbours in the
inverse. Note that the full inverse is NOT provided!
Havard Rue hrue@r-inla.org
## dense matrix example n = 10 A = matrix(runif(n^2), n, n) Q = A %*% t(A) print(mean(abs(inla.qinv(Q) - solve(Q)))) ## sparse matrix example rho = 0.9 Q = toeplitz(c(1+rho^2, -rho, rep(0, n-3), -rho)) / (1-rho^2) Q = inla.as.dgTMatrix(Q) Q.inv = inla.qinv(Q) ## compute the marginal variances as a vector from a precision matrix marginal.variances = diag(inla.qinv(Q)) ## read the sparse matrix from a file in the 'i, j, value' format filename = tempfile() write(t(cbind(Q@i+1L, Q@j+1L, Q@x)), ncol=3, file=filename) Qinv = inla.qinv(filename) unlink(filename)
## dense matrix example n = 10 A = matrix(runif(n^2), n, n) Q = A %*% t(A) print(mean(abs(inla.qinv(Q) - solve(Q)))) ## sparse matrix example rho = 0.9 Q = toeplitz(c(1+rho^2, -rho, rep(0, n-3), -rho)) / (1-rho^2) Q = inla.as.dgTMatrix(Q) Q.inv = inla.qinv(Q) ## compute the marginal variances as a vector from a precision matrix marginal.variances = diag(inla.qinv(Q)) ## read the sparse matrix from a file in the 'i, j, value' format filename = tempfile() write(t(cbind(Q@i+1L, Q@j+1L, Q@x)), ncol=3, file=filename) Qinv = inla.qinv(filename) unlink(filename)
This function compute the reordering (or find the best reordering) using the GMRFLib implementation
inla.qreordering(graph, reordering = inla.reorderings())
inla.qreordering(graph, reordering = inla.reorderings())
graph |
A |
reordering |
The name of the reordering algorithm to be used; either
one of the names listed in |
inla.qreordering
returns a list with the name of the
reordering algorithm used or found, the reordering code for the reordering
algorithm, the actual reordering and its inverse.
Havard Rue hrue@r-inla.org
g = system.file("demodata/germany.graph", package="INLA") r = inla.qreordering(g) m = inla.graph2matrix(g) r = inla.qreordering(m)
g = system.file("demodata/germany.graph", package="INLA") r = inla.qreordering(g) m = inla.graph2matrix(g) r = inla.qreordering(m)
This function generate samples from a GMRF using the GMRFLib implementation
inla.qsample( n = 1L, Q, b, mu, sample, constr, reordering = INLA::inla.reorderings(), seed = 0L, logdens = ifelse(missing(sample), FALSE, TRUE), compute.mean = ifelse(missing(sample), FALSE, TRUE), num.threads = NULL, selection = NULL, verbose = inla.getOption("verbose"), .debug = FALSE )
inla.qsample( n = 1L, Q, b, mu, sample, constr, reordering = INLA::inla.reorderings(), seed = 0L, logdens = ifelse(missing(sample), FALSE, TRUE), compute.mean = ifelse(missing(sample), FALSE, TRUE), num.threads = NULL, selection = NULL, verbose = inla.getOption("verbose"), .debug = FALSE )
n |
Number of samples. Only used if |
Q |
The precision matrix or a filename containing it. |
b |
The linear term |
mu |
The mu term |
sample |
A matrix of optional samples where each column is a sample. If set, then evaluate the log-density for each sample only. |
constr |
Optional linear constraints; see |
reordering |
The type of reordering algorithm to be used for
|
seed |
Control the RNG. If PLEASE NOTE1: If PLEASE NOTE2: If the PARDISO sparse matrix library is used, continuity of the samples with respect to small changes in the precision matrix, can be expected but is not guaranteed. If this feature is required, please use the TAUCS sparse matrix library. |
logdens |
If |
compute.mean |
If |
num.threads |
Maximum number of threads the |
selection |
A vector of indices of each sample to return. |
verbose |
Logical. Run in verbose mode or not. |
.debug |
Logical. Internal debug-mode. |
The log-density has form -1/2(x-mu)^T Q (x-mu) + b^T x
If logdens
is FALSE
, then inla.qsample
returns the
samples in a matrix, where each column is a sample. If logdens
or
compute.mean
is TRUE
, then a list with names sample
,
logdens
and mean
is returned. The samples are stored in the
matrix sample
where each column is a sample, and the log densities of
each sample are stored as the vector logdens
. The mean (include
corrections for the constraints, if any) is store in the vector mean
.
Havard Rue hrue@r-inla.org
g = system.file("demodata/germany.graph", package="INLA") Q = inla.graph2matrix(g) diag(Q) = dim(Q)[1L] x = inla.qsample(10, Q) ## Not run: matplot(x) x = inla.qsample(10, Q, logdens=TRUE) ## Not run: matplot(x$sample) n = 3 Q = diag(n) ns = 2 ## sample and evaluate a sample x = inla.qsample(n, Q=Q, logdens=TRUE) xx = inla.qsample(Q=Q, sample = x$sample) print(x$logdens - xx$logdens) ## the use of a constraint constr = list(A = matrix(rep(1, n), 1, n), e = 0) x = inla.qsample(n, Q=Q, constr=constr) print(constr$A %*% x) ## control the RNG (require serial mode) x = inla.qsample(n, Q=Q, seed = 123, num.threads="1:1") ## restart from same seed, only sample 1 xx = inla.qsample(n=1, Q=Q, seed = 123, num.threads="1:1") ## continue from the save state, sample the remaining 2 xxx = inla.qsample(n=n-1, Q=Q, seed = -1, num.threads="1:1") ## should be 0 print(x - cbind(xx, xxx))
g = system.file("demodata/germany.graph", package="INLA") Q = inla.graph2matrix(g) diag(Q) = dim(Q)[1L] x = inla.qsample(10, Q) ## Not run: matplot(x) x = inla.qsample(10, Q, logdens=TRUE) ## Not run: matplot(x$sample) n = 3 Q = diag(n) ns = 2 ## sample and evaluate a sample x = inla.qsample(n, Q=Q, logdens=TRUE) xx = inla.qsample(Q=Q, sample = x$sample) print(x$logdens - xx$logdens) ## the use of a constraint constr = list(A = matrix(rep(1, n), 1, n), e = 0) x = inla.qsample(n, Q=Q, constr=constr) print(constr$A %*% x) ## control the RNG (require serial mode) x = inla.qsample(n, Q=Q, seed = 123, num.threads="1:1") ## restart from same seed, only sample 1 xx = inla.qsample(n=1, Q=Q, seed = 123, num.threads="1:1") ## continue from the save state, sample the remaining 2 xxx = inla.qsample(n=n-1, Q=Q, seed = -1, num.threads="1:1") ## should be 0 print(x - cbind(xx, xxx))
This routine use the GMRFLib implementation to solve linear systems with a SPD matrix.
inla.qsolve( Q, B, reordering = inla.reorderings(), method = c("solve", "forward", "backward") )
inla.qsolve( Q, B, reordering = inla.reorderings(), method = c("solve", "forward", "backward") )
Q |
A SPD matrix, either as a (dense) matrix or sparse-matrix |
B |
The right hand side matrix, either as a (dense) matrix or sparse-matrix. |
reordering |
The type of reordering algorithm to be used for
|
method |
The system to solve, one of |
inla.qsolve
returns a matrix X
, which is the solution
of Q X = B
, L X = B
or L^T X = B
depending on the value
of method
.
Havard Rue hrue@r-inla.org
n = 10 nb <- n-1 QQ = matrix(rnorm(n^2), n, n) QQ <- QQ %*% t(QQ) Q = inla.as.sparse(QQ) B = matrix(rnorm(n*nb), n, nb) X = inla.qsolve(Q, B, method = "solve") XX = inla.qsolve(Q, B, method = "solve", reordering = inla.qreordering(Q)) print(paste("err solve1", sum(abs( Q %*% X - B)))) print(paste("err solve2", sum(abs( Q %*% XX - B)))) ## the forward and backward solve is tricky, as after permutation and with Q=LL', then L is ## lower triangular, but L in the orginal ordering is not lower triangular. if the rhs is iid ## noise, this is not important. to control the reordering, then the 'taucs' library must be ## used. inla.setOption(smtp = 'taucs') ## case 1. use the matrix as is, no reordering r <- "identity" L = t(chol(Q)) X = inla.qsolve(Q, B, method = "forward", reordering = r) XX = inla.qsolve(Q, B, method = "backward", reordering = r) print(paste("err forward ", sum(abs(L %*% X - B)))) print(paste("err backward", sum(abs(t(L) %*% XX - B)))) ## case 2. use a reordering from the library r <- inla.qreordering(Q) im <- r$ireordering m <- r$reordering print(cbind(idx = 1:n, m, im) ) Qr <- Q[im, im] L = t(chol(Qr))[m, m] X = inla.qsolve(Q, B, method = "forward", reordering = r) XX = inla.qsolve(Q, B, method = "backward", reordering = r) print(paste("err forward ", sum(abs( L %*% X - B)))) print(paste("err backward", sum(abs( t(L) %*% XX - B))))
n = 10 nb <- n-1 QQ = matrix(rnorm(n^2), n, n) QQ <- QQ %*% t(QQ) Q = inla.as.sparse(QQ) B = matrix(rnorm(n*nb), n, nb) X = inla.qsolve(Q, B, method = "solve") XX = inla.qsolve(Q, B, method = "solve", reordering = inla.qreordering(Q)) print(paste("err solve1", sum(abs( Q %*% X - B)))) print(paste("err solve2", sum(abs( Q %*% XX - B)))) ## the forward and backward solve is tricky, as after permutation and with Q=LL', then L is ## lower triangular, but L in the orginal ordering is not lower triangular. if the rhs is iid ## noise, this is not important. to control the reordering, then the 'taucs' library must be ## used. inla.setOption(smtp = 'taucs') ## case 1. use the matrix as is, no reordering r <- "identity" L = t(chol(Q)) X = inla.qsolve(Q, B, method = "forward", reordering = r) XX = inla.qsolve(Q, B, method = "backward", reordering = r) print(paste("err forward ", sum(abs(L %*% X - B)))) print(paste("err backward", sum(abs(t(L) %*% XX - B)))) ## case 2. use a reordering from the library r <- inla.qreordering(Q) im <- r$ireordering m <- r$reordering print(cbind(idx = 1:n, m, im) ) Qr <- Q[im, im] L = t(chol(Qr))[m, m] X = inla.qsolve(Q, B, method = "forward", reordering = r) XX = inla.qsolve(Q, B, method = "backward", reordering = r) print(paste("err forward ", sum(abs( L %*% X - B)))) print(paste("err backward", sum(abs( t(L) %*% XX - B))))
Construct a graph-object from a file or a matrix; write graph-object to file
inla.read.graph(..., size.only = FALSE) inla.write.graph( graph, filename = "graph.dat", mode = c("binary", "ascii"), ... ) ## S3 method for class 'inla.graph' plot(x, y, ...) ## S3 method for class 'inla.graph' summary(object, ...) ## S3 method for class 'inla.graph.summary' print(x, ...)
inla.read.graph(..., size.only = FALSE) inla.write.graph( graph, filename = "graph.dat", mode = c("binary", "ascii"), ... ) ## S3 method for class 'inla.graph' plot(x, y, ...) ## S3 method for class 'inla.graph' summary(object, ...) ## S3 method for class 'inla.graph.summary' print(x, ...)
... |
Additional arguments. In |
size.only |
Only read the size of the graph |
graph |
An |
filename |
The filename of the graph. |
mode |
The mode of the file; ascii-file or a (gzip-compressed) binary. |
x |
An |
y |
Not used |
object |
An |
The output of inla.read.graph
, is an inla.graph
object, with elements
n |
is the size of the graph |
nnbs |
is a vector with the number of neigbours |
nbs |
is a list-list with the neigbours |
cc |
list with connected component information
|
Methods
implemented for inla.graph
are summary
and plot
. The
method plot
require the libraries Rgraphviz
and graph
from the Bioconductor-project, see https://www.bioconductor.org.
Havard Rue hrue@r-inla.org
## a graph from a file g.file1 <- tempfile() # E.g. "g.dat" cat("3 1 1 2 2 1 1 3 0\n", file = g.file1) g = inla.read.graph(g.file1) ## writing an inla.graph-object to file g.file2 = inla.write.graph(g, mode="binary", filename = tempfile()) ## re-reading it from that file gg = inla.read.graph(g.file2) summary(g) summary(gg) ## Not run: plot(g) inla.spy(g) ## when defining the graph directly in the call, ## we can use a mix of character and numbers g = inla.read.graph(c(3, 1, "1 2 2 1 1 3", 0)) inla.spy(c(3, 1, "1 2 2 1 1 3 0")) inla.spy(c(3, 1, "1 2 2 1 1 3 0"), reordering=3:1) inla.write.graph(c(3, 1, "1 2 2 1 1 3 0")) ## building a graph from adjacency matrix adjacent = matrix(0, nrow = 4, ncol = 4) adjacent[1,4] = adjacent[4,1] = 1 adjacent[2,4] = adjacent[4,2] = 1 adjacent[2,3] = adjacent[3,2] = 1 adjacent[3,4] = adjacent[4,3] = 1 g = inla.read.graph(adjacent) plot(g) summary(g) ## End(Not run)
## a graph from a file g.file1 <- tempfile() # E.g. "g.dat" cat("3 1 1 2 2 1 1 3 0\n", file = g.file1) g = inla.read.graph(g.file1) ## writing an inla.graph-object to file g.file2 = inla.write.graph(g, mode="binary", filename = tempfile()) ## re-reading it from that file gg = inla.read.graph(g.file2) summary(g) summary(gg) ## Not run: plot(g) inla.spy(g) ## when defining the graph directly in the call, ## we can use a mix of character and numbers g = inla.read.graph(c(3, 1, "1 2 2 1 1 3", 0)) inla.spy(c(3, 1, "1 2 2 1 1 3 0")) inla.spy(c(3, 1, "1 2 2 1 1 3 0"), reordering=3:1) inla.write.graph(c(3, 1, "1 2 2 1 1 3 0")) ## building a graph from adjacency matrix adjacent = matrix(0, nrow = 4, ncol = 4) adjacent[1,4] = adjacent[4,1] = 1 adjacent[2,4] = adjacent[4,2] = 1 adjacent[2,3] = adjacent[3,2] = 1 adjacent[3,4] = adjacent[4,3] = 1 g = inla.read.graph(adjacent) plot(g) summary(g) ## End(Not run)
A framework for defining latent models in R
inla.rgeneric.ar1.model( cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL ) inla.rgeneric.ar1.model.opt( cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL ) inla.rgeneric.iid.model( cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL ) inla.rgeneric.define( model = NULL, debug = FALSE, compile = TRUE, optimize = FALSE, ... ) inla.rgeneric.wrapper( cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), model, theta = NULL ) inla.rgeneric.q( rmodel, cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL )
inla.rgeneric.ar1.model( cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL ) inla.rgeneric.ar1.model.opt( cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL ) inla.rgeneric.iid.model( cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL ) inla.rgeneric.define( model = NULL, debug = FALSE, compile = TRUE, optimize = FALSE, ... ) inla.rgeneric.wrapper( cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), model, theta = NULL ) inla.rgeneric.q( rmodel, cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"), theta = NULL )
cmd |
An allowed request |
theta |
Values of theta |
model |
The definition of the model; see |
debug |
Logical. Enable debug output |
compile |
Logical. Compile the definition of the model or not. |
optimize |
Logical. With this option |
... |
Named list of variables that defines the environment of
|
rmodel |
The rgeneric model-object, the output of
|
This allows a latent model to be defined in R
. See
inla.rgeneric.ar1.model
and inla.rgeneric.iid.model
and the
documentation for worked out examples of how to define latent models in this
way. This will be somewhat slow and is intended for special cases and
protyping. The function inla.rgeneric.wrapper
is for internal use
only.
Havard Rue hrue@r-inla.org
A(n experimental) framework for defining a prior in R
inla.rprior.define(rprior = NULL, ...)
inla.rprior.define(rprior = NULL, ...)
rprior |
An R-function returning the log-prior evaluated at its argument |
... |
Named list of variables that will be in the environment of |
An inla.rprior
-object which can be used as a prior
Havard Rue hrue@r-inla.org
## see example in inla.doc("rprior")
## see example in inla.doc("rprior")
Breslow (1984) analyses some mutagenicity assay data (shown below) on salmonella in which three plates have been processed at each dose i of quinoline and the number of revertant colonies of TA98 Salmonella measured
A data frame with 18 observations on the following 3 variables.
number of salmonella bacteria
dose of quinoline (mg per plate)
indicator
WinBUGS/OpenBUGS manual Examples VOl.I
data(Salm)
data(Salm)
This function scales an intrinsic GMRF model so the geometric mean of the marginal variances is one
inla.scale.model.internal(Q, constr = NULL, eps = sqrt(.Machine$double.eps)) inla.scale.model(Q, constr = NULL, eps = sqrt(.Machine$double.eps))
inla.scale.model.internal(Q, constr = NULL, eps = sqrt(.Machine$double.eps)) inla.scale.model(Q, constr = NULL, eps = sqrt(.Machine$double.eps))
Q |
A SPD matrix, either as a (dense) matrix or |
constr |
Linear constraints spanning the null-space of |
eps |
A small constant added to the diagonal of |
inla.scale.model
returns a sparseMatrix
of type
dgTMatrix
scaled so the geometric mean of the marginal variances (of
the possible non-singular part of Q
) is one, for each connected
component of the matrix.
Havard Rue hrue@r-inla.org
## Q is singular data(Germany) g = system.file("demodata/germany.graph", package="INLA") Q = -inla.graph2matrix(g) diag(Q) = 0 diag(Q) = -rowSums(Q) n = dim(Q)[1] Q.scaled = inla.scale.model(Q, constr = list(A = matrix(1, 1, n), e=0)) print(diag(MASS::ginv(as.matrix(Q.scaled)))) ## Q is singular with 3 connected components g = inla.read.graph("6 1 2 2 3 2 2 1 3 3 2 1 2 4 1 5 5 1 4 6 0") print(paste("Number of connected components", g$cc$n)) Q = -inla.graph2matrix(g) diag(Q) = 0 diag(Q) = -rowSums(Q) n = dim(Q)[1] Q.scaled = inla.scale.model(Q, constr = list(A = matrix(1, 1, n), e=0)) print(diag(MASS::ginv(as.matrix(Q.scaled)))) ## Q is non-singular with 3 connected components. no constraints needed diag(Q) = diag(Q) + 1 Q.scaled = inla.scale.model(Q) print(diag(MASS::ginv(as.matrix(Q.scaled))))
## Q is singular data(Germany) g = system.file("demodata/germany.graph", package="INLA") Q = -inla.graph2matrix(g) diag(Q) = 0 diag(Q) = -rowSums(Q) n = dim(Q)[1] Q.scaled = inla.scale.model(Q, constr = list(A = matrix(1, 1, n), e=0)) print(diag(MASS::ginv(as.matrix(Q.scaled)))) ## Q is singular with 3 connected components g = inla.read.graph("6 1 2 2 3 2 2 1 3 3 2 1 2 4 1 5 5 1 4 6 0") print(paste("Number of connected components", g$cc$n)) Q = -inla.graph2matrix(g) diag(Q) = 0 diag(Q) = -rowSums(Q) n = dim(Q)[1] Q.scaled = inla.scale.model(Q, constr = list(A = matrix(1, 1, n), e=0)) print(diag(MASS::ginv(as.matrix(Q.scaled)))) ## Q is non-singular with 3 connected components. no constraints needed diag(Q) = diag(Q) + 1 Q.scaled = inla.scale.model(Q) print(diag(MASS::ginv(as.matrix(Q.scaled))))
scopy
modelThis function provide access to the parameterisation of the scopy
model
inla.scopy.define(n = 5L)
inla.scopy.define(n = 5L)
n |
Number of parameters, either 2 (intercept and slope) or >= 5 (intercept, slope and a spline representing the deviation from it) |
A list with the number of parameters and matrix defining basis vectors for the scopy model
Havard Rue hrue@r-inla.org
scopy
This function computes the mean and stdev for the spline function that is
implicite from an scopy
model component
inla.scopy.summary( result, name, mean.value = NULL, slope.value = NULL, by = 0.01, range = c(0, 1), debug = FALSE )
inla.scopy.summary( result, name, mean.value = NULL, slope.value = NULL, by = 0.01, range = c(0, 1), debug = FALSE )
result |
An |
name |
The name of the |
mean.value |
In case where the mean of the spline is fixed and not estimated, you have to give it here |
slope.value |
In case where the slope of the spline is fixed and not estimated, you have to give it here |
by |
The resolution of the results, in the scale where
|
range |
The range of the locations, as |
debug |
If |
A data.frame
with locations, mean and stdev. If name
is not found, NULL is returned.
Havard Rue hrue@r-inla.org
## see example in inla.doc("scopy")
## see example in inla.doc("scopy")
The rate of lip cancer in 56 counties in Scotland is recorder. The data set includes the observed and expected cases (based on the population and its age and sex distribution in the country), a covariate measuring the percentage of the population engaged in agricolture, fishing or forestry and the "position" of each county expressed as a list of adjacent counties
A data frame with 56 observations on the following 4 variables.
The number of lip cancer registered
The expected number of lip cancer
The percentage of the population engaged in agricolture, fishing or forestry
The county
OpenBUGS Example manual, GeoBUGS
Clayton and Kaldor (1987) and Breslow and Clayton (1993)
data(Scotland)
data(Scotland)
Proportion of seeds that germinated on each of 21 plates arranged according to a 2 by 2 factorial layout by seed and type of root extract
A data frame with 21 observations on the following 5 variables.
number of germinated seeds per plate
number of total seeds per plate
seed type
root extracted
indicator for the plate
WinBUGS/OpenBUGS Manual Example, Vol. I
data(Seeds)
data(Seeds)
Simulated data set on 200 location points. The simulation process is made at the introduction of the SPDE tutorial.
A data frame with 200 observations on the following 3 variables.
First element of the coordinates
Second element of the coordinates
data simulated at the locations
SPDE tutorial
data(SPDEtoy)
data(SPDEtoy)
Takes a fitted inla
or surv.inla
object produced by
inla
or surv.inla
and produces a summary from it.
## S3 method for class 'inla' summary(object, digits = 3L, include.lincomb = TRUE, ...) ## S3 method for class 'summary.inla' print(x, digits = 3L, ...)
## S3 method for class 'inla' summary(object, digits = 3L, include.lincomb = TRUE, ...) ## S3 method for class 'summary.inla' print(x, digits = 3L, ...)
object |
a fitted |
digits |
Integer Number of digits |
include.lincomb |
Logcial Include the summary for the the linear combinations or not |
... |
other arguments. |
x |
a |
Posterior mean and standard deviation (together with quantiles or cdf) are printed for the fixed effects in the model.
For the random effects the function summary()
prints the posterior
mean and standard deviations for the hyperparameters
If the option short.summary
is set to TRUE
using
inla.setOption
, then a less verbose summary variant will be used,
which might be more suitable for Markdown documents.
summary.inla
returns an object of class summary.inla
,
a list of components to print.
Sara Martino and Havard Rue
Construct and print inla.mesh
object summaries
## S3 method for class 'inla.mesh' summary(object, verbose = FALSE, ...) ## S3 method for class 'summary.inla.mesh' print(x, ...)
## S3 method for class 'inla.mesh' summary(object, verbose = FALSE, ...) ## S3 method for class 'summary.inla.mesh' print(x, ...)
object |
an object of class |
verbose |
If |
... |
further arguments passed to or from other methods. |
x |
an object of class |
Finn Lindgren finn.lindgren@gmail.com
This example considers mortality rates in 12 hospitals performing cardiac surgery in babies
A data frame with 12 observations on the following 3 variables.
Number of deaths
Total number of cases
a factor with levels A
B
C
D
E
F
G
H
I
J
K
L
WinBUGS/OpenBUGS Manual Examples Vol. I
data(Surg)
data(Surg)
Simulated data set for Weibull survival model
A data frame with 100 observations on the following 3 variables.
a numeric vector of survival times
a numeric vector of event indicator (0=censured 1=failure)
a numeric vector of covariate
Recorded days of rain above 1 mm in Tokyo for 2 years, 1983:84
A data frame with 366 observations on the following 3 variables.
number of days with rain
total number of days
day of the year
http://www.math.ntnu.no/~hrue/GMRF-book/tokyo.rainfall.data.dat
Rue, H and Held, L. (2005) Gaussian Markov Random Fields - Theory and Applications Chapman and Hall
data(Tokyo)
data(Tokyo)
Undernutrition of children in each region of Zambia is measured through a score computed on the basis of some anthropometric measures. The data set contains also other infomation about each child.
A data frame with 4847 observations on the following 10 variables.
standardised Z score of stunting
body mass index of the mother
age of the child in months
district where the child lives
mother employment status with categories "working" (1) and "not working" (-1)
mother's educations status with
categories "complete primary but incomplete secondary " (edu1=1)
,
"complete secondary or higher" (edu2=1
) and "no education or
incomplete primary" (edu1=edu2=-1
)
see above
locality of the domicile with categories "urban" (1) and "rural" (-1)
gender of the child with categories "male" (1) and "female" (-1)
DO NOT KNOW; check source
BayesX Manual http://www.stat.uni-muenchen.de/~bayesx/bayesx.html
data(Zambia)
data(Zambia)