Changelog
Source:NEWS.md
spmodel 0.6.0
CRAN release: 20240416
Minor Updates
 Improved efficiency of handling random effects in big data models fit using
splm(..., local)
andspglm(..., local)
.  Changed
Matrix::rankMatrix(X, method = "tolNorm2")
toMatrix::rankMatrix(X, method = "qr")
when determining linear independence inX
, the design matrix of explanatory variables.  Replaced an error message with a warning message when
X
has perfect collinearities (i.e., is not full rank). If this warning message occurs, it is possible that a subsequent error occurs while model fitting resulting from a covariance matrix that is not positive definite (i.e., a covariance matrix that is singular or computationally singular).  Improved efficiency of
splm()
whenspcov_type
is"none"
and there are no random effects (#15).  Added a
range_positive
argument tospautor()
andspgautor()
that whenTRUE
(the new default), restricts the range parameter to be positive. WhenFALSE
(the prior default), the range parameter may be negative or positive.  Updated the initial parameter grid search for
spautor()
andspgautor()
to include range parameter values near the lower and upper boundaries.  Minor documentation updates
Bug Fixes
 Fixed a bug that yielded improper predictions when performing local prediction (specifying
local
in a call topredict(object, newdata, ...)
) when the model object (object
) was fit usingsplm(formula, ...)
orspglm(formula, ...)
andformula
contained at least one call topoly(..., raw = FALSE)
.  Fixed a bug that caused big data models fit using
splm(..., local)
andspglm(..., local)
to fail when a userspecified local index was passed tolocal
that was a factor variable and at least one factor level not was observed in the local index.  Fixed a bug that caused models fit using
splm(..., partition_factor)
andspglm(..., partition_factor)
to fail when the partition factor variable was a factor variable and at least one factor level was not observed in the data.  Fixed a bug in
spgautor()
that inflated the covariance matrix of the fixed effects (accessible viavcov()
).  Fixed a bug in
sp*(spcov_params, ...)
simulation functions that caused an error whenspcov_params
had class"car"
or"sar"
andW
was provided by the user.
spmodel 0.5.1
CRAN release: 20240109
Minor Updates
 Set a default value of
newdata_size = 1
whennewdata_size
was omitted while predictingtype = "response"
for binomial families.  Improved computational efficiency of
loocv(object)
whenobject
was created usingsplm()
orspglm()
,spcov_type
was"none"
, and there were no random effects specified viarandom
.  Changed the number of kmeans iterations from 10 to 30 (when fitting models using the
local
argument tosplm()
orspglm()
).  Added bias and rootmeansquaredprediction error to
loocv(object)
. Whenobject
was created usingsplm()
orspautor()
,loocv(object)
added the squared correlation between the observed data and leaveoneout predictions, regarded as a prediction rsquared.  Improved prediction efficiency (using
predict()
oraugment()
) forsplm()
objects whenspcov_type
was"none"
and there were no random effects.  Minor error message updates.
Bug Fixes
 Fixed a bug that caused local prediction to fail when the fitted model used a partition factor (#13).
 Fixed a bug that caused significant increases in computational and memory demands when calling
loocv(object, local, ...)
ifobject
was created usingsplm(..., random)
orspglm(..., random)
(i.e., when random effects were specified via therandom
argument tosplm()
orspglm()
).  Fixed a bug that caused significant increases in computational and memory demands when calling
loocv(object, local, ...)
ifobject
was created usingsplm(..., partition_factor)
orspglm(..., partition_factor)
(i.e., when a partition factor was specified via thepartition_factor
argument tosplm()
orspglm()
).
spmodel 0.5.0
CRAN release: 20231025
Minor updates
 Predictions can now be made for prediction locations whose random effect levels are not present in the observed data
 When this occurs, the randomeffect covariance between the observed data and these prediction locations is assumed to be zero.
 The default for
local = TRUE
insplm()
andspglm()
now uses thekmeans
assignment method with group sizes approximately equal to 100. Previously, the
random
assignment method was used with group sizes approximately equal to 50.
 Previously, the
 The default for
local = TRUE
inpredict()
andaugment()
now uses 100 local neighbors. Previously, 50 local neighbors were used.
 Moved the “A Detailed Guide to
spmodel
” and “Technical Details” vignettes to the package website.  Added a “Spatial Generalized Linear Models in
spmodel
” vignette to the package website.  Changed name of “An Overview of Basic Features in
spmodel
” vignette to “An Introduction tospmodel
” and changed output type from PDF to HTML.  Other minor vignette updates.
 Minor documentation updates.
Bug fixes
 Fixed a bug that occurred with prediction for success/failure binomial data (e.g., Bernoulli data) when
local
inpredict()
wasTRUE
.  Fixed a bug that could affect simulating data using
sprbinom()
when thesize
argument was different from1
.  Fixed a bug that could cause local prediction to fail when only one level of a random effect was present in the prediction site’s local neighborhood.
 Fixed a bug that could cause an error when local estimation was used for the
"svwls"
estimation method.  Fixed a bug that caused undesirable behavior from
tidy()
whenconf.level
was less than zero or greater than one.
spmodel 0.4.0
CRAN release: 20230526
Major updates
 Added an
spglm()
function to fit spatial generalized linear models for pointreferenced data (i.e., generalized geostatistical models).  Added an
spgautor()
function to fit spatial generalized linear models for areal data (i.e., spatial generalized autoregressive models).
spgautor()
syntax is very similar tospautor()
syntax.  Poisson, negative binomial, binomial, beta, gamma, and inverse Gaussian families are accommodated.

spgautor()
fitted model objects use the same generics asspautor()
fitted model objects.

Bug fixes
 Fixed a bug in
spcov_params()
that yielded output with improper names when a named vector was used as an argument.  Fixed a bug in
spautor()
that did not properly coerceM
if given as a matrix (instead of a vector).  Fixed a bug in
esv()
that prevented coercion ofPOLYGON
geometries toPOINT
geometries ifdata
was ansf
object.  Fixed a bug in
esv()
that did not removeNA
values from the response.  Fixed a bug in
splm()
andspautor()
that caused an error when random effects or partition factors were ordered factors.  Fixed a bug in
spautor()
that prevented an error from occurring when a partition factor was not categorical or not a factor  Fixed a bug in
covmatrix(object, newdata)
that returned a matrix with improper dimensions whenspcov_type
was"none"
.  Fixed a bug in
predict()
that caused an error when at least one level of a fixed effect factor was not observed within a local neighborhood (when thelocal
method was"covariance"
or"distance")
.  Fixed a bug in
cooks.distance()
that used the Pearson residuals instead of the standarized residuals.
spmodel 0.3.0
CRAN release: 20230310
Minor updates
 Added the
varcomp
function to compare variance components.  Added an error message when there are
NA
values in predictors.  Added an error message when the design (model) matrix is not invertible (i.e., perfect collinearities are detected).
 Added support for plotting anisotropic level curves of equal correlation when the
which
argument toplot()
contains8
.  Renamed
residuals()
typeraw
toresponse
to matchstats::lm()
.  Changed class of
splm()
output to"splm"
from"spmod"
or"splm_list"
from"spmod_list"
.  Changed class of
spautor()
output to"spautor"
from"spmod"
or"spautor_list"
from"spautor_list"
.  Changed class of
splmRF()
output to"splmRF"
from"spmodRF"
or"splmRF_list"
from"spmodRF_list"
.  Changed class of
spautorRF()
output to"spautorRF"
from"spmodRF"
or"spautorRF_list"
from"spmodRF_list"
.  Methods corresponding to a generic function defined outside of
spmodel
are now all documented using an.spmodel
suffix, making it easier to find documentation of a particularspmodel
method for the generic function of interest.  Added an error when random effect grouping variables or partition factors are numeric.
 Added an error when random effect or partition factor levels in
newdata
are not also indata
.  Updated citation information.
Bug fixes
 Fixed a bug that produced irregular spacing in an error message for
spcov_initial()
.  Fixed a bug that prevented proper display of row names when calling
predict()
withinterval = "confidence"
.  Fixed a bug that sometimes caused miscalculations in modelfitting and prediction when random effect or partition factor variables were improperly coerced to a different type.
 Fixed bugs that sometimes caused miscalculations in certain model diagnostics.
 Fixed inconsistencies in several nonexported generic functions.
 Fixed a bug that prevented names from appearing with output from certain model diagnostics.
spmodel 0.2.0
CRAN release: 20221111

spmodel
v0.3.0 changed the names ofspmod
,spmodRF
,spmod_list
, andspmodRF_list
objects.
Minor updates

splm()
andspautor()
allow multiple models to be fit when thespcov_type
argument is a vector of length greater than one or thespcov_initial
argument is a list (with length greater than one) ofspcov_initial
objects.  Added the
splmRF()
andspautorRF()
functions to fit random forest spatial residual models. The resulting object has class
spmodRF
(one spatial covariance) orspmodRF_list
(multiple spatial covariances)  These objects are built for use with
predict()
to perform prediction.
 The resulting object has class
 Added the
covmatrix()
function to extract covariance matrices from anspmod
object fit usingsplm()
orspautor()
.  Minor vignette updates.
 Minor documentation updates.