NEWS | R Documentation |

spaMM now fits models with random effects in the residual dispersion model, and thus implements a class of “double hierarchical GLMs”.

fitme() now fits models with offset in the dispersion model.

Modified convergence criteria for the iterative algorithm in HLfit().

Examples run generally faster by about 30%.

New extractor function get_intervals() and “member extractor” get_ZALMatrix().

Intervals returned by predict.HLfit() (and hence by get_intervals()) use Student's t distribution when the fitted model is a simple linear model.

Prediction variance can now be computed from fits of models with a corrMatern term.

An HLfit object's $APHLs$p_bv for a *fixed-effect* model now returns the restricted likelihood (for estimation of residual dispersion parameters), which it has never done so far (out of disregard for this case). This allows REML fits of fixed-effect models using fitme() (but has no bearing on similar fits using HLfit()).

More informative summary() when non-default spatial distance function, or non-default prior weights, are used.

New 'refit' control in fitme().

New extractor function get_RLRTSim_args() for use with the LRTSim package to perform small-sample LRT of the presence of a random effect.

Summary() outlook revised, in particular to more accurately display the meaning of phi for Gamma response.

The objects returned by the fitting functions should be of much smaller size than before.

Better reporting of terms that have to be ignored in the computation of prediction variance.

New 'inverse.Gamma', 'spaMM-conventions' and 'member-extractor' documentation pages. HLfit() documentation revised.

Some numerical issues that could affect GLM fitting with HLfit() have been fixed.

More accurate detection of unidentifiable random effect components, when residual variance formulas involve a pure offset term.

confint() on a LMM fitted by fitme() was returning incorrect results. This is corrected.

Computation of prediction variance has been reimplemented so that it requires storing smaller matrices than before. Further, some terms required for this computation are computed only when prediction variance is requested, rather than being always returned by HLfit(). This allows some gains in computation time for large data sets.

simulate.HLfit() gets new arguments and prints some information, in anticipation of future developments.

spaMM.colors() gets new argument 'adjustcolor_args' for finer control.

Filled plot functions gets new argument 'plot.title'.

spaMM_glm(), which has been designed to 'rescue' stats::glm() when the latter fails, did not rescue it for some Gamma(log) GLMs. This is corrected.

Computation of AIC (and other information criteria) failed in many cases. This is corrected.

confint() did not correctly handle models with several random effects. This is corrected.

fitme() does not fit random-slope models, nor models with offset in the dispersion model, but this was not documented. This is corrected.

C++ code has been fixed for compatibility with recent standards.

New fitme() function, intended to become the main fitting function in spaMM, can be substantially faster than HLfit() or corrHLfit(), particularly for large data sets, but can occasionally be slower.

Some other moderate but noticeable improvements in speed.

Users no longer need to explicitly request AIC computation when calling the fit of a model. The new extractor function get_any_IC() (or its more conventionnally named alias, AIC()) can be used to compute them from a fitted model object.

Negative binomial response models can be fitted by 'family=negbin()'.

The syntax 'family=COMPoisson()', with unknown 'COMP_nu' parameter, works. This means that COMpoisson() models can now be fitted with unknown values of this parameter, by corrHLfit() or by the new fitme() function. The same is true for the parameter of the 'negbin' family.

Initial or fixed values of the variance of random effects can be controlled independently when there are several random effects.

spaMM_glm() gains a new argument 'strict' for finer control. spaMM_glm.fit() has increased default 'control$maxit'.

filled.mapMM() now returns a predictor of the response surface. It also gains a new argument 'smoothObject' that takes such a predictor, allowing for faster redrawing.

fixedLRT() gets a new argument 'fittingFunction' to select between corrHLfit() and fitme().

Revised usage of 'corrMatrix' argument of HLCor().

'spaMM', as well as 'RcppEigen', had become broken for Windows 32bit. See https://github.com/RcppCore/RcppEigen/issues/34 for details. A suitable compilation flag is now used to overcome this issue.

simulate.HLfit() could fail when a design matrix was stored as a _M_atrix. This is corrected.

predict.HLfit() can return prediction intervals.

New spaMM_glm() and spaMM_glm.fit() functions provide a robust alternative (using the Levenberg-Marquardt algorithm) to glm.fit() when the latter diverges. They also circumvent the initial-value issues of glm().

Slight general increase in speed.

The Conway-Maxwell-Poisson family is implemented.

New extractor functions get_fixefVar(), get_predVar(), get_residVar() and get_respVar().

Subsetting the result of a predict() call also subsets its variance attributes, thanks to a new internal 'Extract' method '[.predictions'.

spaMM is protected from disturbing numerical problems of the Gamma()$dev.resids() function, thanks to an internal redefinition of the Gamma family.

New 'control.glm' argument of HLfit(), to control calls to spaMM_glm() within HLfit().

Once-again revamped 'variances' argument and documentation of predict.HLfit(). The 'variances' argument of filled.mapMM() is replaced by 'variance'.

New argument 'resid.model' replaces 'resid.formula' and 'resid.family' specifications in the main fitting function.

The default behaviour of mapMM() for argument 'map.asp=NULL' has been modified.

The obscure control parameters 'RHOMAX' and 'NUMAX' previously accessible through spaMM.options() are no longer needed and have been removed.

Better control of some plot margins.

Fitting random-slope models may be substantially less slow (but still slow).

Printing bug for non-standard REML formula in summary.HLfit() corrected.

Conditions where predict() return an object of class 'predictions' corrected to avoid a printing bug.

The 'xrange' and 'yrange' arguments of spaMMplot2D() were not effective. This is corrected.

Printing bug in summary.fixedLRT() corrected.

spaMM.options(maxLambda=. . .) did not fully control extreme lambda estimates. The revised code is more effective, and also better bypasses some numerical problems that can occur for such values.

Fitting phi using the corrHLfit() outer optimization mechanism was inefficiently implemented and could return some confusing output. This is corrected.

Less inefficient code for fixed-effect models, faster and handling larger data sets.

Changed default value of 'upper' argument of optim call() within corrHLfit(), and better reporting of issues with this call.

Argument 'which' replaces arguments 'REML' in logLik().

New control 'break_conv_logL' in argument control.HLfit of function HLfit(). Mainly for development purposes.

Improved reporting of convergence issues in HLfit().

More comfortable print method for vcov() value.

This new version includes several improvements of predict(), the most notable being a correction of prediction variances for new values of predictor variables, which were incorrect in CRAN version 1.6.2 (but not in CRAN version 1.5.1). Many other more trivial bugs or features of predict() have been corrected.

summary.fixedLRT() failed to display correctly the bootstrap results. This is corrected.

A bug in C++ code, introduced in version 1.7.1, has been corrected in version 1.7.2; and code applying some Eigen functions on a matrix with a dimension equal to zero (generating an UBSAN runtime error but a correct retrun value in other conditions) has been fixed.

Prediction variance can now account for uncertainty is dispersion parameters (though not for all models; see Details of 'disp' in the 'predict' documentation).

Now allows prediction for a large number of spatial positions by storing some large correlation matrices on disk rather than in memory (using the ff package, and as controlled by the spaMM option 'ff_threshold').

Convenience extractor functions 'dev_resids' and 'deviance' have been added.

New data objects 'worldcountries' and 'oceanmask' added for better plots of spatial predictions (see the new documentation '?raster' for plot of spatial predictions using rasters and geographical projections).

More efficient implementation of a conditional autoregressive (CAR) model.

're.form' argument of 'predict' function has been extended to handle values of class 'formula'.

etaFix$beta usage has been extensively revised to provide a convenient interface for fixing (some of) the fixed effects (beta coefficients) values.

If anyone on Earth ever tried inverse.Gamma("-1/mu") random effects, s-he might have been confronted with negative estimates of u_h. This problem is inherent to the algorithms described in the HGLM literature, but spaMM now brings a solution, which allows one to fit more securely models with v ~ Gamma( lambda/(lambda+1), lambda+1). A new link identity is also allowed for Gamma random effects [i.e., v=u ~ Gamma(1/lambda,lambda) ], albeit with the restriction that lambda is < 1.

New 'symSVD' argument for designL.from.Corr function.

New keyword 'predict' for 'which' argument of 'plot.HLfit', for easier plotting of prediction diagnostic plot.

'make.scaled.dist' has been renamed 'make_scaled_dist', and gets a new 'return_matrix' argument for programming purposes.

Substantial gains in speed for moderately large data sets (hundreds of lines), in particular by minimizing the use of the QR module from Eigen.

Users no longer have to think about pre-computing prediction coefficients. 'predictionCoeffs' function has been removed. 'coeffs' argument of predict.HLfit() has been removed.

More compact printing of predict() results.

The output format of information criterias computed by HLfit, and related documentation, have been revised.

confint() did not correctly handle PQL fits. This is corrected. In addition, it better handles some non-convergence issues.

Gamma response models with non-unit 'prior.weights' produced an inaccurate correction from EQL to 'HL(1,1)'. This is corrected.

anova() and LRT() declared some nested models as non-nested, and sometimes stopped. This is corrected.

HLfit could stop on some fits involving moderately large sparse design matrices (Z) for random effects. This is corrected.

A printing bug for ranef(), which prevented the display of its result when lambda was fixed, has been corrected

New example_maxtime package option for controlling execution of examples.

Tests are now controlled by a local environment variable _LOCAL_TESTS_ so that they are not run on CRAN.

Faster code for (some) sparse models with a single random effect on large data sets. It is also possible (by using

`spaMM.options(QRmethod=Matrix::qr)`

) to use sparse matrix algorithms in other models, but this will be slow in many applications. Various other changes were made to speed up computation in dense models (by about 10% in the tests).The non-Euclidean distance functions implemented in the

`proxy`

package (e.g. Geodesic) can now be used (although only Geodesic was tested, and the Matern correlation function with arbitrary rho and nu is not mathematically feasible for all distance functions). See`control.dist`

argument of`HLCor`

and`corrHLfit`

.

Reorganized graphic functions, with new

`spaMMplot2D`

function and new`envir`

argument for`mapMM.HLfit`

.-
`predict.HLfit`

modified for better consistency with other widely used predict methods: added`newdata`

argument and modified default behaviour of`binding`

argument. New

`getDistMat`

extractor for extracting the distance matrix used in the MatÃ©rn modelThis NEWS.Rd file is created

Correction of a bug that caused incorrect prediction on new data for 1D (only) spatial model.