Skip to content

Commit 0aa4a6b

Browse files
committed
accommodate sphet
1 parent f43cbd3 commit 0aa4a6b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Authors@R: c(person("Roger", "Bivand", role = c("cre", "aut"), email = "Roger.Bi
2626
person(given = "Mauricio", family = "Sarrias", role = c("ctb"), email = "[email protected]"),
2727
person(given = "JuanTomas", family = "Sayago", role = c("ctb"), email = "[email protected]"),
2828
person("Michael", "Tiefelsdorf", role = "ctb"))
29-
Depends: R (>= 3.3.0), spData (>= 2.3.1), Matrix, sf
29+
Depends: R (>= 3.3), spData (>= 2.3.1), Matrix, sf
3030
Imports: spdep (>= 1.4-1), coda, methods, MASS, boot, splines, LearnBayes,
3131
nlme, multcomp
3232
Suggests: parallel, RSpectra, tmap, foreign, spam, knitr, lmtest, expm,
33-
sandwich, rmarkdown, igraph (>= 2.0.0), tinytest, codingMatrices
33+
sandwich, rmarkdown, igraph, tinytest, codingMatrices
3434
Description: A collection of all the estimation functions for spatial cross-sectional models (on lattice/areal data using spatial weights matrices) contained up to now in 'spdep'. These model fitting functions include maximum likelihood methods for cross-sectional models proposed by 'Cliff' and 'Ord' (1973, ISBN:0850860369) and (1981, ISBN:0850860814), fitting methods initially described by 'Ord' (1975) <doi:10.1080/01621459.1975.10480272>. The models are further described by 'Anselin' (1988) <doi:10.1007/978-94-015-7799-1>. Spatial two stage least squares and spatial general method of moment models initially proposed by 'Kelejian' and 'Prucha' (1998) <doi:10.1023/A:1007707430416> and (1999) <doi:10.1111/1468-2354.00027> are provided. Impact methods and MCMC fitting methods proposed by 'LeSage' and 'Pace' (2009) <doi:10.1201/9781420064254> are implemented for the family of cross-sectional spatial regression models. Methods for fitting the log determinant term in maximum likelihood and MCMC fitting are compared by 'Bivand et al.' (2013) <doi:10.1111/gean.12008>, and model fitting methods by 'Bivand' and 'Piras' (2015) <doi:10.18637/jss.v063.i18>; both of these articles include extensive lists of references. A recent review is provided by 'Bivand', 'Millo' and 'Piras' (2021) <doi:10.3390/math9111276>. 'spatialreg' >= 1.1-* corresponded to 'spdep' >= 1.1-1, in which the model fitting functions were deprecated and passed through to 'spatialreg', but masked those in 'spatialreg'. From versions 1.2-*, the functions have been made defunct in 'spdep'. From version 1.3-6, add Anselin-Kelejian (1997) test to `stsls` for residual spatial autocorrelation <doi:10.1177/016001769702000109>.
3535
License: GPL-2
3636
URL: https://github.com/r-spatial/spatialreg/, https://r-spatial.github.io/spatialreg/

R/SLX_WX.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,10 @@ impacts.SlX <- function(obj, ...) {
272272
stopifnot(!is.null(attr(obj, "mixedImps")))
273273
n <- nrow(obj$model)
274274
k <- obj$qr$rank
275+
hfp <- attr(obj, "have_factor_preds")
276+
if (is.null(hfp)) hfp <- FALSE
275277
impactsWX(attr(obj, "mixedImps"), n, k, type="SlX", method="glht",
276-
have_factor_preds=attr(obj, "have_factor_preds"))
278+
have_factor_preds=hfp)
277279
}
278280

279281
impactsWX <- function(obj, n, k, type="SlX", method="glht", have_factor_preds=FALSE) {

0 commit comments

Comments
 (0)