The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
rspde_safe_inla() now finds the INLA executable with
INLA >= 26.11, which no longer sets the inla.call
option. Previously it reported INLA as not installed correctly, so INLA
examples and tests were skipped. A missing executable is now reported
with a hint to run INLA::inla.stiles.install().type_rational_approximation = "wl2", a new way of
obtaining the rational coefficients. The classes are parameterised so
that every fit is a valid model and have no constant term, so the
covariance-based models have m instead of
m + 1 latent blocks. Available in
matern.operators() and
CBrSPDE.matern.operators() for both
type = "covariance" and type = "operator", in
matern.rational() and matern.rational.cov()
for the exact one-dimensional models, and directly through
rational.coefficients.wl2(). It requires
floor(nu + d/2) to be 0, 1 or 2 for the covariance type,
that is nu < 3 - d/2, and nu + d/2 < 2
for the operator type. The existing "brasil",
"chebfun" and "chebfunLB" types are unchanged
and remain the default.spde.matern.operators() accepts
type_rational_approximation = "wl2" for both
type = "covariance" and type = "operator". The
coefficients depend on alpha and the dimension only, not on
the varying kappa and tau, so the same ones
serve the non-stationary model; the blocks carry the shift in the same
way as the stationary ones.spde.matern.operators() with
type = "covariance") joined its blocks outside the loop
over the poles, so the precision had three blocks whatever the order.
For m at least 3 the model was silently the wrong one,
missing the poles 2 to m-1.spde.matern.operators() with
type = "operator" did not pass
type_rational_approximation on, so every type gave the same
model.type = "operator" now accepts only two of the four
rational types. Its factorisation has a single table of roots, produced
by the chebfun lower-bound method, so "chebfunLB" selects
that table and "wl2" fits its own; "brasil"
and "chebfun" are refused rather than quietly given roots
they did not produce, and remain available for
type = "covariance". Leaving
type_rational_approximation at its default is unaffected.
The tabulated roots are stored for m at most 4, while
"wl2" fits them at any order. The operator-based models
have no INLA interface; rspde.matern() is covariance-based
throughout.rspde.matern1d() accepts
type.rational.approx = "wl2", for a fixed nu
and for an estimated one. The exact one-dimensional model then has
rspde.order blocks of floor(alpha) + 1 entries
per location instead of that plus a k-block, and the pole blocks carry
the shared shift.rspde.matern() accepts
type.rational.approx = "wl2", for a fixed nu
and for an estimated one, with rspde.order at least 1. The
latent field then has rspde.order blocks instead of
rspde.order + 1, which rspde.make.A() and
rspde.make.index() follow through their new
type.rational.approx argument.d = 1 to 3, m = 1
to 6 and floor(alpha) = 0, 1 and 2. They depend on neither
the mesh nor kappa and are what a covariance-based model
uses by default, so the common case fits nothing at set-up.
data-raw/wl2_tables.R regenerates them, and the tests check
that a fresh fit still reproduces what is stored.rspde.xmin(), which computes the lower end of the
spectral interval from the mesh and a lower bound for
kappa, and the arguments x_min and
kappa_ref to matern.operators(). Fitting on
that shorter interval is appreciably more accurate than the mesh-free
fit, and is done when the model is created.
update_rational_coefficients() recomputes the coefficients
once kappa has been estimated.rspde.wl2.table(), which builds a weighted-L2
table for a given spectral interval, and the wl2_table
argument of matern.operators(), which takes one and
overrides x_min and kappa_ref. A table built
for another dimension, order or range of alpha is refused
rather than used.rspde.cache(), which keeps generated coefficient
tables between sessions, under
tools::R_user_dir("rSPDE", "cache") or a directory of your
choosing. It is off by default, since a package should not write outside
the session temporary directory unless asked; the environment variable
RSPDE_CACHE_DIR sets it for non-interactive use. Lookup is
automatic, and a table fitted on a slightly wider spectral interval is
reused, since it still covers the whole spectrum.variance_correction = "nodal" to
matern.operators(), which adds
max(sigma^2 - diag(Sigma), 0) to the diagonal of the
covariance of a "wl2" covariance-based model. What this
corrects is mostly the finite element discretisation rather than the
rational approximation. It is off by default, as it depends on the
parameters it cannot be tabulated, so it is meant for a model whose
parameters are already estimated.src/wl2_fit.cpp holds the inner loop of the weighted-L2
fit. The INLA cgeneric sources remain optional and are
still built only with RSPDE_COMPILE=1 or
--configure-args='--enable-compiled'. The equivalent R
implementation is kept as the reference and is used when
options(rSPDE.wl2.use.cpp = FALSE).RSpectra dependency is gone.
rspde.xmin(eigenvalue = "exact") and the scaling of the
intrinsic models now use Lanczos iterations in the package. Both are
also more robust, and the intrinsic one is faster than the old
method.intrinsic.operators() now honours its opts
argument, which was built and then replaced by a hardcoded list. Its
entries are tol and maxitr, as before.matern.rational.cov(), which evaluated the
covariance at the lags h[1] - h, rather than at
h. A matrix of lags is now also accepted, and returns a
matrix.get.roots() now uses spline interpolation by default.
Linear interpolation lost accuracy off the 200-node beta grid of the
tables (symbol error 1.6e-4 instead of 1.8e-6 at beta = 0.875, m =
4).rspde.spacetime() models
whose spatial mesh is a metric_graph.
bru_get_mapper() used bm_fmesher() for the
graph, which has no fm_dof() method, so bru()
failed with “invalid subscript type ‘list’”.Makefile now only uses Homebrew
gcc-14 on macOS and the compilers R was configured with
elsewhere, so compiled installs (RSPDE_COMPILE=1) work on
Linux.posterior_crossvalidation() is now an S3 generic, with
methods for rspde_lme fits and for lists of fitted models.
MetricGraph provides the graph_lme method, so the two
packages no longer mask each other’s function, and a list can mix
rspde_lme and graph_lme fits.posterior_crossvalidation() for objects fitted
with rspde_lme(). The function mirrors the interface of
MetricGraph::posterior_crossvalidation.hybrid.spde(), a new hybrid Whittle-Matern SPDE
model with a non-zero deterministic mean.rspde.hybrid.matern(), a INLA cgeneric model for
the hybrid Whittle-Matern SPDE with alpha = 2.kappa_mu option that lets the operator applied
to the mean use a different range parameter from the one in the
covariance. Default (kappa_mu = NULL in
hybrid.spde(), separate_kappa_mu = FALSE in
rspde.hybrid.matern()) keeps them linked. When enabled,
kappa_mu is estimated jointly in rspde_lme and
INLA, or can be held fixed via
model_options$fix_kappa_mu.shared_lib also accepts a path to a shared
library file.rspde_safe_inla() and
local_rspde_safe_inla(), which check that a usable INLA
installation is available, for use in examples and tests.rspde.metric_graph() now passes shared_lib
on to rspde.matern(), and its default is now
"detect", matching the other INLA models.fmesher (>= 0.7.0) and suggests
inlabru (>= 2.14.0).predict.rspde_lme() can reuse precomputed
parameter-dependent quantities, which speeds up repeated predictions
such as in cross-validation.predict.rspde_lme() for models with replicates:
the same location in different replicates no longer triggers a
duplicated-locations warning.update() for non-stationary models, where new
theta values were ignored, so predictions from
non-stationary rspde_lme() fits used stale parameters.spde.matern.operators() no longer converts a model to a
stationary one when B.tau or B.kappa vary in
space.covariance_mesh, cov_function_mesh,
and make_A documentation.model_options argument to
rspde_lme() function, which allows users to set starting
values for different parameters and also to fix parameters during
estimation.previous_fit argument to
rspde_lme(), which allows users to provide a previously
fitted model as input to obtain starting values for a new fit.cross_validation function to allow for
multiple likelihoods.rspde.intrinsic for stability.rspde.intrinsic.wCRPS and swCRPS scores on
cross_validation.group_predict function, to obtain
predictions on a testing set based on observations on a training
set.stochvol, stochvol.nig,
stochvolln and binomial likelihoods in
cross_validation function.nu.upper.bound to 2 in dimension
1, and keeping the default nu.upper.bound to 4 in dimension
2 in rspde.matern() function.matern.rational() operators for creating
stationary matern operators.spacetime.operators() for creating space-time
models.matern2d.operators() for anisotropic
operators.INLA and inlabru.INLA and inlabru.INLA and inlabru.data argument in predict.rspde_lme has
been changed to newdata.covariance_mesh and
cov_function_mesh methods as functions in the list returned
by objects obtained from matern.operators() and
spde.matern.operators().MetricGraph package.cross_validation function to match the
updates in inlabru.glance and augment methods for
rspde_lme objects.cross_validation function which has several
scoring rules implemented (MSE, CRPS, SCRPS, DSS) based on our
inlabru implementation of the rational SPDE approach.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.