Documentation and dependency updates for CRAN compatibility
See NEWS for version 2.3.0 for the major updates since version 2.1.13
The model component argument
map has been deprecated. Use
main to specify
the main component input,
~ elev(main = elevation, model = "rw2").
Unlike the old
main is the first one, so the shorter version
~ elev(elevation, model = "rw2") also works.
Intercept-like components should now have explicit inputs, e.g.
to avoid accidental confusion with other variables.
The argument list for
bru() has been simplified, so that all arguments except
options must either be outputs from calls to
arguments that can be sent to a single
The option setting system has been replaced with a more coherent system;
?bru_options() for details.
domain system for
lgcp models is now stricter, and
domain definitions for all the point process dimensions.
Alternatively, user-defined integration schemes can be supplied via the
The model component input arguments
can now take general R expressions using the data inputs. Special cases are detected:
SpatialPixels/GridDataFrame objects are evaluated at spatial locations if
the input data is a
SpatialPointsDataFrame object. Functions are evaluated
on the data object, e.g.
field(coordinates, model = spde)
The component arguments
replicate_mapper can be
used for precise control of the mapping between inputs and latent variables.
?bru_mapper for more details. Mapper information is automatically extracted
INLA::inla.spde2.pcmatern() model objects.
copy features are now supported.
The predictor expressions can access the data object directly via
If data from several rows can affect the same output row, the
allow_combine = TRUE
argument must be supplied to
exclude arguments to
can be used to specify which components are used for a given likelihood model
or predictor expression. This can be used to prevent evaluation of components
that are invalid for a likelihood or predictor.
Predictor expressions can access the latent state of a model component directly,
by adding the suffix
_latent to the component name, e.g.
like(), this requires
allow_latent = TRUE to activate the needed linearisation code for this.
Predictor expressions can evaluate component effects for arbitrary inputs by
adding the suffix
_eval to access special evaluator functions, e.g.
name_eval(1:10). This is useful for evaluating the 1D effect of spatial covariates.
See the NEWS item for version 2.2.8 for further details.
The internal system for predictor linearisation and iterated INLA inference has been rewritten to be faster and more robust
See the NEWS entries for versions 2.1.14 to 2.2.8 for further details on new features and bug fixes
_evalsuffix feature for
predict.bru, that provides a general evaluator function for each component, allowing evaluation of e.g. nonlinear effects of spatial covariates as a function of the covariate value instead of the by the spatial evaluator used in the component definition. For example, with
components = ~ covar(spatial_grid_df, model = "rw1"), the prediction expression can have
~ covar_eval(covariate), where
covariateis a data column in the prediction data object.
For components with
replicate features, these also need to be
provided to the
_eval function, with
..._eval(..., group = ..., replicate = ...)
This feature is built on top of the
_latent suffix feature, that gives
direct access to the latent state variables of a component, so in order to
_eval in the model predictor itself, you must use
like(..., allow_latent = TRUE) in the model definition.
Add support for
nrep in component definitions
mrsea data sets, with consistent km units and
improved mesh designs
predict(..., include) discussion to distance sampling vignette, for
handling non-spatial prediction in spatial models.
Fix bugs in
Fix minor bug in
Spatial* object handling and plotting
Fixed issue with
predict() logic for converting output to
control.mode=list(restart=FALSE) in the final inla run for nonlinear
models, to avoid an unnecessary optimisation.
Fix issues in
ncol=0 data frame parts.
Support for the INLA "copy" feature,
comp2(input, copy = "comp1")
Allow component weights to be an unnamed parameter,
comp(input, weights, ...)
Direct access to the data objects in component inputs and predictor
.data., allowing e.g.
covar(fun(.data.), ...) for a complex
covariate extractor method
Partial support for spherical manifold meshes
Uses INLA integration strategy "eb" for initial nonlinear iterations, and a specified integration strategy only for the final iteration, so that the computations are faster, and uses the conditional latent mode as linearisation point.
New options system
New faster linearisation method
New line search method to make the nonlinear inla iterations robust
Method for updating old stored estimation objects
System for supplying mappings between latent models and evaluated effects
Improved factor support; Either as "contrast with the 1st level", via the
"factor_contrast" model, or all levels with model
Further options planned (e.g. a simpler options to fix the precision
parameter). The estimated coefficients appear as random effects in the
Interface restructuring to support new features while keeping most
backwards compatibility. Change
main= or unnamed first argument;
main is the first parameter, it doesn't need to be a named argument.
Keep components with zero derivative in the linearisation
Add random seed option for posterior sampling
Add package unit testing
New backend code to make extended feature support easier
int.args option to control spatial integration resolution,
thanks to Martin Jullum (
Update default options
int.polygon from integrating outside the mesh domain,
and generally more robust integration scheme construction.
like() parameter logic. (Thanks to Peter Vesk for bug example)
NEWS.md file to track changes to the package.
inla methods for
generate() that convert
inla output into
bru objects before calling the
and posterior sample generator.
Added protection for examples requiring optional packages
sample.lgcp output formatting, extended CRS support, and more efficient sampling algorithm
Avoid dense matrices for effect mapping
iinla()tracks convergence of both fixed and random effects
Added matrix geom
Fixed CRAN test issues
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.