diff --git a/docs/404.html b/docs/404.html index 1d5dc7c..62e0300 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/articles/SpatialFiltering.html b/docs/articles/SpatialFiltering.html index 1f4e6bd..07818e2 100644 --- a/docs/articles/SpatialFiltering.html +++ b/docs/articles/SpatialFiltering.html @@ -33,7 +33,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -130,14 +130,20 @@

Introduction
 library(spdep)
 require("sf", quietly=TRUE)
-NY8 <- st_read(system.file("shapes/NY8_utm18.shp", package="spData"))
-
## Reading layer `NY8_utm18' from data source 
-##   `/home/rsb/lib/r_libs/spData/shapes/NY8_utm18.shp' using driver `ESRI Shapefile'
-## Simple feature collection with 281 features and 17 fields
-## Geometry type: POLYGON
+if (packageVersion("spData") >= "2.3.2") {
+    NY8 <- sf::st_read(system.file("shapes/NY8_utm18.gpkg", package="spData"))
+} else {
+    NY8 <- sf::st_read(system.file("shapes/NY8_bna_utm18.gpkg", package="spData"))
+    sf::st_crs(NY8) <- "EPSG:32618"
+    NY8$Cases <- NY8$TRACTCAS
+}
+
## Reading layer `sf_bna2_utm18' from data source 
+##   `/home/rsb/lib/r_libs/spData/shapes/NY8_bna_utm18.gpkg' using driver `GPKG'
+## Simple feature collection with 281 features and 12 fields
+## Geometry type: MULTIPOLYGON
 ## Dimension:     XY
-## Bounding box:  xmin: 358241.9 ymin: 4649755 xmax: 480393.1 ymax: 4808545
-## Projected CRS: WGS 84 / UTM zone 18N
+## Bounding box: xmin: 357628 ymin: 4649538 xmax: 480360.3 ymax: 4808317 +## Projected CRS: UTM Zone 18, Northern Hemisphere
 NY_nb <- read.gal(system.file("weights/NY_nb.gal", package="spData"), override.id=TRUE)
@@ -209,19 +215,23 @@ 

Introduction NYlistwW <- nb2listw(NY_nb, style = "W") set.seed(111)

-nyME <- ME(Cases~PEXPOSURE+PCTAGE65P+PCTOWNHOME, data=NY8, offset=log(POP8), family="poisson", listw=NYlistwW, alpha=0.44)
+nyME <- ME(Cases~PEXPOSURE+PCTAGE65P+PCTOWNHOME, data=NY8, offset=log(POP8), family="poisson", listw=NYlistwW, alpha=0.46)
 nyME
##   Eigenvector ZI pr(ZI)
 ## 0          NA NA   0.31
-## 1          24 NA   0.44
-## 2         223 NA   0.42
-## 3         206 NA   0.43
-## 4         169 NA   0.48
+## 1 24 NA 0.46 +## 2 164 NA 0.41 +## 3 113 NA 0.44 +## 4 60 NA 0.50
-NY8$eigen_24 <- fitted(nyME)[,1]
-NY8$eigen_223 <- fitted(nyME)[,2]
+NY8$eigen_1 <- fitted(nyME)[,1] +NY8$eigen_2 <- fitted(nyME)[,2]
+#gry <- brewer.pal(9, "Greys")[-1]
+plot(NY8[,c("eigen_1", "eigen_2")])
+

+
 nyglmME <- glm(Cases~PEXPOSURE+PCTAGE65P+PCTOWNHOME+offset(log(POP8))+fitted(nyME), data=NY8, family="poisson")
 summary(nyglmME)
## 
@@ -229,27 +239,27 @@ 

Introduction ## glm(formula = Cases ~ PEXPOSURE + PCTAGE65P + PCTOWNHOME + offset(log(POP8)) + ## fitted(nyME), family = "poisson", data = NY8) ## -## Coefficients: -## Estimate Std. Error z value Pr(>|z|) -## (Intercept) -8.13431 0.18388 -44.237 < 2e-16 *** -## PEXPOSURE 0.14136 0.03134 4.511 6.45e-06 *** -## PCTAGE65P 4.16875 0.60149 6.931 4.19e-12 *** -## PCTOWNHOME -0.39290 0.19222 -2.044 0.04096 * -## fitted(nyME)vec24 1.62658 0.72243 2.252 0.02435 * -## fitted(nyME)vec223 0.92941 0.70391 1.320 0.18671 -## fitted(nyME)vec206 -0.11559 0.68987 -0.168 0.86693 -## fitted(nyME)vec169 -1.82674 0.68142 -2.681 0.00735 ** +## Coefficients: (1 not defined because of singularities) +## Estimate Std. Error z value Pr(>|z|) +## (Intercept) -8.123408 0.184525 -44.023 < 2e-16 *** +## PEXPOSURE 0.144595 0.031469 4.595 4.33e-06 *** +## PCTAGE65P 4.072265 0.607725 6.701 2.07e-11 *** +## PCTOWNHOME -0.392118 0.193313 -2.028 0.0425 * +## fitted(nyME)vec24 1.548573 0.725355 2.135 0.0328 * +## fitted(nyME)vec164 -0.166982 0.767258 -0.218 0.8277 +## fitted(nyME)vec113 NA NA NA NA +## fitted(nyME)vec60 -0.001836 0.769811 -0.002 0.9981 ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## (Dispersion parameter for poisson family taken to be 1) ## -## Null deviance: 428.25 on 280 degrees of freedom -## Residual deviance: 340.08 on 273 degrees of freedom +## Null deviance: 428.84 on 280 degrees of freedom +## Residual deviance: 349.30 on 274 degrees of freedom ## AIC: Inf ## ## Number of Fisher Scoring iterations: 5

-
+
 nyGLMp <- glm(Cases~PEXPOSURE+PCTAGE65P+PCTOWNHOME+offset(log(POP8)), data=NY8,family="poisson")
 anova(nyGLMp, nyglmME, test="Chisq")
## Analysis of Deviance Table
@@ -257,11 +267,9 @@ 

Introduction ## Model 1: Cases ~ PEXPOSURE + PCTAGE65P + PCTOWNHOME + offset(log(POP8)) ## Model 2: Cases ~ PEXPOSURE + PCTAGE65P + PCTOWNHOME + offset(log(POP8)) + ## fitted(nyME) -## Resid. Df Resid. Dev Df Deviance Pr(>Chi) -## 1 277 353.35 -## 2 273 340.08 4 13.269 0.01003 * -## --- -## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

+## Resid. Df Resid. Dev Df Deviance Pr(>Chi) +## 1 277 354.0 +## 2 274 349.3 3 4.6969 0.1954

Figure \[fig:geigen2\] shows the spatial patterns chosen to match the very small amount of spatial autocorrelation remaining in the model. As with the other Poisson diff --git a/docs/articles/SpatialFiltering_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/SpatialFiltering_files/figure-html/unnamed-chunk-6-1.png new file mode 100644 index 0000000..a4a1129 Binary files /dev/null and b/docs/articles/SpatialFiltering_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index c9de137..c47f993 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4

diff --git a/docs/articles/nb_igraph.html b/docs/articles/nb_igraph.html index a200616..72aa149 100644 --- a/docs/articles/nb_igraph.html +++ b/docs/articles/nb_igraph.html @@ -33,7 +33,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -162,7 +162,7 @@

## Loading required package: spData
## Loading required package: Matrix
## Loading required package: sf
-
## Linking to GEOS 3.12.1, GDAL 3.9.0, PROJ 9.4.0; sf_use_s2() is TRUE
+
## Linking to GEOS 3.12.2, GDAL 3.9.0, PROJ 9.4.1; sf_use_s2() is TRUE

Getting some data @@ -181,19 +181,19 @@

Getting some datasf_extSoftVersion() }

##           GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
-##       "3.12.1"        "3.9.0"        "9.4.0"         "true"         "true" 
+##       "3.12.2"        "3.9.0"        "9.4.1"         "true"         "true" 
 ##           PROJ 
-##        "9.4.0"
+## "9.4.1"
 library(sf)
-columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1])
+columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")[1])
## Reading layer `columbus' from data source 
-##   `/home/rsb/lib/r_libs/spData/shapes/columbus.shp' using driver `ESRI Shapefile'
+##   `/home/rsb/lib/r_libs/spData/shapes/columbus.gpkg' using driver `GPKG'
 ## Simple feature collection with 49 features and 20 fields
 ## Geometry type: POLYGON
 ## Dimension:     XY
 ## Bounding box:  xmin: 5.874907 ymin: 10.78863 xmax: 11.28742 ymax: 14.74245
-## CRS:           NA
+## Projected CRS: Undefined Cartesian SRS with unknown unit
 row.names(columbus)[1:10]
##  [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"
diff --git a/docs/articles/sids_models.html b/docs/articles/sids_models.html index a7c7117..6365375 100644 --- a/docs/articles/sids_models.html +++ b/docs/articles/sids_models.html @@ -33,7 +33,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -121,7 +121,7 @@

Getting the data into R

We will be using the spdep and spatialreg packages, here version: spdep, version -1.3-4, 2024-05-31, the sf package and the +1.3-5, 2024-06-02, the sf package and the tmap package. The data from the sources referred to above is documented in the help page for the nc.sids data set in @@ -132,8 +132,8 @@

Getting the data into R
 library(spdep)
-nc <- st_read(system.file("shapes/sids.shp", package="spData")[1], quiet=TRUE)
-st_crs(nc) <- "+proj=longlat +datum=NAD27"
+nc <- st_read(system.file("shapes/sids.gpkg", package="spData")[1], quiet=TRUE)
+#st_crs(nc) <- "+proj=longlat +datum=NAD27"
 row.names(nc) <- as.character(nc$FIPSNO)
 nc$ft.SID74 <- sqrt(1000)*(sqrt(nc$SID74/nc$BIR74) + sqrt((nc$SID74+1)/nc$BIR74))
diff --git a/docs/authors.html b/docs/authors.html
index c2ce1d3..9c22ae4 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -17,7 +17,7 @@
       
       
         spatialreg
-        1.3-3
+        1.3-4
       
     
diff --git a/docs/index.html b/docs/index.html index e72f3ce..c5e61ee 100644 --- a/docs/index.html +++ b/docs/index.html @@ -33,7 +33,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/news/index.html b/docs/news/index.html index 728e711..a73dc41 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -64,7 +64,11 @@

Changelog

- + +
  • migrate from ESRI Shapefile to GeoPackage #50
  • +
+
+
  • protect errorsarlm against missing Durbin= if only intercept

  • fix longstanding bugs in getVmate in a non-default side logic branch

  • add return_impacts= to lmSLX to work around issues with aliased variables; impacts should be improved to handle this case when time permits

  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 0c5a74b..0f0366c 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -5,5 +5,5 @@ articles: nb_igraph: nb_igraph.html sids_models: sids_models.html SpatialFiltering: SpatialFiltering.html -last_built: 2024-05-31T15:10Z +last_built: 2024-06-10T11:54Z diff --git a/docs/reference/GMerrorsar.html b/docs/reference/GMerrorsar.html index cf5d8a7..b15b9d5 100644 --- a/docs/reference/GMerrorsar.html +++ b/docs/reference/GMerrorsar.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4
diff --git a/docs/reference/MCMCsamp.html b/docs/reference/MCMCsamp.html index 901b0e9..1a6f95f 100644 --- a/docs/reference/MCMCsamp.html +++ b/docs/reference/MCMCsamp.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/reference/ME.html b/docs/reference/ME.html index 838f2c3..9830382 100644 --- a/docs/reference/ME.html +++ b/docs/reference/ME.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -168,7 +168,7 @@

Examples

#> eV[,1], I: 0.08290518 ZI: NA, pr(ZI): 0.04 #> eV[,9], I: 0.06426565 ZI: NA, pr(ZI): 0.14 #> user system elapsed -#> 1.512 0.005 1.527 +#> 1.188 0.004 1.197 glmME <- glm(c(hopkins_part) ~ 1 + fitted(MEbinom1), family="binomial") #anova(glmME, test="Chisq") coef(summary(glmME)) @@ -188,7 +188,7 @@

Examples

#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # \dontrun{ require("sf", quietly=TRUE) -columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1], quiet=TRUE) +columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")[1], quiet=TRUE) #require("spdep", quietly=TRUE) col.gal.nb <- spdep::read.gal(system.file("weights/columbus.gal", package="spData")[1]) lw <- spdep::nb2listw(col.gal.nb) @@ -220,7 +220,7 @@

Examples

#> eV[,6], I: 0.1178225 ZI: NA, pr(ZI): 0.08 #> eV[,4], I: 0.06242664 ZI: NA, pr(ZI): 0.27 #> user system elapsed -#> 0.636 0.000 0.639 +#> 0.518 0.000 0.520 lagcol1 #> Eigenvector ZI pr(ZI) #> 0 NA NA 0.01 @@ -298,7 +298,7 @@

Examples

#> Multiple R-squared: 0.6294, Adjusted R-squared: 0.5904 #> F-statistic: 16.13 on 4 and 38 DF, p-value: 8.353e-08 #> -nc.sids <- st_read(system.file("shapes/sids.shp", package="spData")[1], quiet=TRUE) +nc.sids <- st_read(system.file("shapes/sids.gpkg", package="spData")[1], quiet=TRUE) rn <- as.character(nc.sids$FIPS) ncCC89_nb <- spdep::read.gal(system.file("weights/ncCC89.gal", package="spData")[1], region.id=rn) diff --git a/docs/reference/ML_models.html b/docs/reference/ML_models.html index f161fa5..b8b12cd 100644 --- a/docs/reference/ML_models.html +++ b/docs/reference/ML_models.html @@ -29,7 +29,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -587,7 +587,7 @@

Examples

#> Computing eigenvalues ... #> #> user system elapsed -#> 0.214 0.000 0.216 +#> 0.141 0.000 0.142 summary(COL.lag.M) #> #> Call:lagsarlm(formula = CRIME ~ INC + HOVAL, data = COL.OLD, listw = listw, @@ -643,7 +643,7 @@

Examples

#> Computing eigenvalues ... #> #> user system elapsed -#> 0.564 0.003 0.571 +#> 0.406 0.001 0.409 summary(COL.lag.sp) #> #> Call:lagsarlm(formula = CRIME ~ INC + HOVAL, data = COL.OLD, listw = listw, @@ -1424,83 +1424,83 @@

Examples

#> 2.22497381 print(system.time(ev <- eigenw(similar.listw(listw)))) #> user system elapsed -#> 0.001 0.000 0.002 +#> 0.001 0.000 0.001 print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="eigen", control=list(pre_eig=ev)))) #> user system elapsed -#> 0.224 0.000 0.226 +#> 0.148 0.000 0.149 ocoef <- coefficients(COL.errW.eig) print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="eigen", control=list(pre_eig=ev, LAPACK=FALSE)))) #> user system elapsed -#> 0.253 0.000 0.254 +#> 0.152 0.000 0.153 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="eigen", control=list(pre_eig=ev, compiled_sse=TRUE)))) #> user system elapsed -#> 0.231 0.000 0.233 +#> 0.147 0.000 0.149 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="Matrix_J", control=list(super=TRUE)))) #> Warning: the default value of argument 'sqrt' of method 'determinant(<CHMfactor>, <logical>)' may change from TRUE to FALSE as soon as the next release of Matrix; set 'sqrt' when programming #> user system elapsed -#> 0.250 0.000 0.252 +#> 0.169 0.000 0.176 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="Matrix_J", control=list(super=FALSE)))) #> user system elapsed -#> 0.266 0.000 0.269 +#> 0.166 0.000 0.166 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="Matrix_J", control=list(super=as.logical(NA))))) #> user system elapsed -#> 0.229 0.000 0.232 +#> 0.164 0.000 0.165 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="Matrix", control=list(super=TRUE)))) #> user system elapsed -#> 0.232 0.000 0.234 +#> 0.153 0.000 0.155 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="Matrix", control=list(super=FALSE)))) #> user system elapsed -#> 0.213 0.000 0.214 +#> 0.151 0.000 0.152 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="Matrix", control=list(super=as.logical(NA))))) #> user system elapsed -#> 0.298 0.000 0.300 +#> 0.152 0.000 0.153 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="spam", control=list(spamPivot="MMD")))) #> user system elapsed -#> 0.324 0.002 0.337 +#> 0.162 0.000 0.162 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="spam", control=list(spamPivot="RCM")))) #> user system elapsed -#> 0.254 0.000 0.256 +#> 0.16 0.00 0.16 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="spam_update", control=list(spamPivot="MMD")))) #> user system elapsed -#> 0.287 0.000 0.300 +#> 0.155 0.000 0.157 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE print(system.time(COL.errW.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, listw, method="spam_update", control=list(spamPivot="RCM")))) #> user system elapsed -#> 0.227 0.000 0.229 +#> 0.156 0.000 0.157 print(all.equal(ocoef, coefficients(COL.errW.eig))) #> [1] TRUE # } diff --git a/docs/reference/SET_MCMC.html b/docs/reference/SET_MCMC.html index fae47cb..0db166e 100644 --- a/docs/reference/SET_MCMC.html +++ b/docs/reference/SET_MCMC.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/reference/SLX.html b/docs/reference/SLX.html index 3157ee8..0d77240 100644 --- a/docs/reference/SLX.html +++ b/docs/reference/SLX.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/reference/SpatialFiltering.html b/docs/reference/SpatialFiltering.html index c55b176..d00a15b 100644 --- a/docs/reference/SpatialFiltering.html +++ b/docs/reference/SpatialFiltering.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -177,7 +177,7 @@

See also

Examples

require("sf", quietly=TRUE)
-columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1], quiet=TRUE)
+columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")[1], quiet=TRUE)
 #require("spdep", quietly=TRUE)
 col.gal.nb <- spdep::read.gal(system.file("weights/columbus.gal", package="spData")[1])
 lmbase <- lm(CRIME ~ INC + HOVAL, data=columbus)
diff --git a/docs/reference/aple.html b/docs/reference/aple.html
index 4a0b37e..85cf2e6 100644
--- a/docs/reference/aple.html
+++ b/docs/reference/aple.html
@@ -17,7 +17,7 @@
       
       
         spatialreg
-        1.3-3
+        1.3-4
       
     
@@ -112,7 +112,7 @@

See also

Examples

-
wheat <- st_read(system.file("shapes/wheat.shp", package="spData")[1], quiet=TRUE)
+    
wheat <- st_read(system.file("shapes/wheat.gpkg", package="spData")[1], quiet=TRUE)
 library(spdep)
 #> 
 #> Attaching package: ‘spdep’
diff --git a/docs/reference/aple.mc.html b/docs/reference/aple.mc.html
index 532dbb3..da43ccc 100644
--- a/docs/reference/aple.mc.html
+++ b/docs/reference/aple.mc.html
@@ -17,7 +17,7 @@
       
       
         spatialreg
-        1.3-3
+        1.3-4
       
     
@@ -112,7 +112,7 @@

See also

Examples

# \dontrun{
-wheat <- st_read(system.file("shapes/wheat.shp", package="spData")[1], quiet=TRUE)
+wheat <- st_read(system.file("shapes/wheat.gpkg", package="spData")[1], quiet=TRUE)
 nbr1 <- spdep::poly2nb(wheat, queen=FALSE)
 nbrl <- spdep::nblag(nbr1, 2)
 nbr12 <- spdep::nblag_cumul(nbrl)
diff --git a/docs/reference/aple.plot.html b/docs/reference/aple.plot.html
index 77012c9..875f3a2 100644
--- a/docs/reference/aple.plot.html
+++ b/docs/reference/aple.plot.html
@@ -17,7 +17,7 @@
       
       
         spatialreg
-        1.3-3
+        1.3-4
       
     
@@ -128,7 +128,7 @@

See also

Examples

# \dontrun{
-wheat <- st_read(system.file("shapes/wheat.shp", package="spData")[1], quiet=TRUE)
+wheat <- st_read(system.file("shapes/wheat.gpkg", package="spData")[1], quiet=TRUE)
 nbr1 <- spdep::poly2nb(wheat, queen=FALSE)
 nbrl <- spdep::nblag(nbr1, 2)
 nbr12 <- spdep::nblag_cumul(nbrl)
diff --git a/docs/reference/do_ldet.html b/docs/reference/do_ldet.html
index b10a757..88a6497 100644
--- a/docs/reference/do_ldet.html
+++ b/docs/reference/do_ldet.html
@@ -17,7 +17,7 @@
       
       
         spatialreg
-        1.3-3
+        1.3-4
       
     
diff --git a/docs/reference/eigenw.html b/docs/reference/eigenw.html index 6e91b66..5aa859f 100644 --- a/docs/reference/eigenw.html +++ b/docs/reference/eigenw.html @@ -23,7 +23,7 @@ spatialreg - 1.3-3 + 1.3-4
diff --git a/docs/reference/gstsls.html b/docs/reference/gstsls.html index 370bfd2..f5c6f65 100644 --- a/docs/reference/gstsls.html +++ b/docs/reference/gstsls.html @@ -18,7 +18,7 @@ spatialreg - 1.3-3 + 1.3-4
diff --git a/docs/reference/impacts.html b/docs/reference/impacts.html index 3fdc36f..71cda4b 100644 --- a/docs/reference/impacts.html +++ b/docs/reference/impacts.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4
@@ -215,7 +215,7 @@

See also

Examples

require("sf", quietly=TRUE)
-columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1], quiet=TRUE)
+columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")[1], quiet=TRUE)
 #require("spdep", quietly=TRUE)
 col.gal.nb <- spdep::read.gal(system.file("weights/columbus.gal", package="spData")[1])
 listw <- spdep::nb2listw(col.gal.nb)
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 2ff40b5..0ce5590 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -17,7 +17,7 @@
       
       
         spatialreg
-        1.3-3
+        1.3-4
       
     
diff --git a/docs/reference/invIrM.html b/docs/reference/invIrM.html index fc961af..7743f53 100644 --- a/docs/reference/invIrM.html +++ b/docs/reference/invIrM.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4
@@ -181,13 +181,13 @@

Examples

#> 0.003 0.000 0.003 system.time(e <- invIrM(nb7rt, rho=0.9, method="chol", feasible=NULL) %*% x) #> user system elapsed -#> 0.002 0.000 0.003 +#> 0.003 0.000 0.003 system.time(e <- invIrM(nb7rt, rho=0.9, method="solve", feasible=TRUE) %*% x) #> user system elapsed #> 0.001 0.000 0.001 system.time(e <- invIrM(nb7rt, rho=0.9, method="solve", feasible=NULL) %*% x) #> user system elapsed -#> 0.002 0.000 0.001 +#> 0.002 0.000 0.002 # }
diff --git a/docs/reference/lagmess.html b/docs/reference/lagmess.html index 103ecf3..91d14fd 100644 --- a/docs/reference/lagmess.html +++ b/docs/reference/lagmess.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -250,7 +250,7 @@

Examples

#> system.time(obj2 <- lagmess(log(PRICE) ~ PATIO + log(AGE) + log(SQFT), data=baltimore, listw=lw)) #> user system elapsed -#> 0.042 0.000 0.043 +#> 0.03 0.00 0.03 (x <- summary(obj2)) #> Matrix exponential spatial lag model: #> diff --git a/docs/reference/lextrB.html b/docs/reference/lextrB.html index 34ece15..61d999b 100644 --- a/docs/reference/lextrB.html +++ b/docs/reference/lextrB.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/reference/predict.sarlm.html b/docs/reference/predict.sarlm.html index b0e694b..913d59f 100644 --- a/docs/reference/predict.sarlm.html +++ b/docs/reference/predict.sarlm.html @@ -19,7 +19,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/reference/sarlm_tests.html b/docs/reference/sarlm_tests.html index d03e2f0..acfeb84 100644 --- a/docs/reference/sarlm_tests.html +++ b/docs/reference/sarlm_tests.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -187,7 +187,7 @@

See also

Examples

require("sf", quietly=TRUE)
-columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1], quiet=TRUE)
+columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")[1], quiet=TRUE)
 #require("spdep", quietly=TRUE)
 col.gal.nb <- spdep::read.gal(system.file("weights/columbus.gal", package="spData")[1])
 lm.mod <- lm(CRIME ~ HOVAL + INC, data=columbus)
diff --git a/docs/reference/set.mcOption.html b/docs/reference/set.mcOption.html
index 6470e5a..6a2542b 100644
--- a/docs/reference/set.mcOption.html
+++ b/docs/reference/set.mcOption.html
@@ -17,7 +17,7 @@
       
       
         spatialreg
-        1.3-3
+        1.3-4
       
     
diff --git a/docs/reference/set.spChkOption.html b/docs/reference/set.spChkOption.html index edeef26..d6acbd4 100644 --- a/docs/reference/set.spChkOption.html +++ b/docs/reference/set.spChkOption.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4
diff --git a/docs/reference/similar.listw.html b/docs/reference/similar.listw.html index 853df67..00b2a35 100644 --- a/docs/reference/similar.listw.html +++ b/docs/reference/similar.listw.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/reference/sparse_mat.html b/docs/reference/sparse_mat.html index 6e645cb..8a6ea12 100644 --- a/docs/reference/sparse_mat.html +++ b/docs/reference/sparse_mat.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -117,7 +117,7 @@

See also

Examples

# \dontrun{
 require(sf, quietly=TRUE)
-columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1], quiet=TRUE)
+columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")[1], quiet=TRUE)
 #require(spdep, quietly=TRUE)
 col.gal.nb <- spdep::read.gal(system.file("weights/columbus.gal", package="spData")[1])
 col.listw <- spdep::nb2listw(col.gal.nb)
@@ -180,11 +180,11 @@ 

Examples

W <- as(lw, "CsparseMatrix") system.time(e <- invIrM(nb7rt, rho=0.98, method="solve", feasible=NULL) %*% x) #> user system elapsed -#> 0.003 0.000 0.003 +#> 0.003 0.000 0.002 system.time(ee <- powerWeights(W, rho=0.98, X=x)) #> Warning: not converged within order iterations #> user system elapsed -#> 0.241 0.001 0.246 +#> 0.170 0.007 0.178 str(attr(ee, "internal")) #> List of 5 #> $ series: num [1:250] 0.287 0.234 0.201 0.178 0.16 ... @@ -197,10 +197,10 @@

Examples

# \dontrun{ system.time(ee <- powerWeights(W, rho=0.9, X=x)) #> user system elapsed -#> 0.195 0.000 0.200 +#> 0.129 0.006 0.135 system.time(ee <- powerWeights(W, rho=0.98, order=1000, X=x)) #> user system elapsed -#> 0.860 0.000 0.868 +#> 0.795 0.009 0.807 all.equal(e, as(ee, "matrix"), check.attributes=FALSE) #> [1] TRUE nb60rt <- spdep::cell2nb(60, 60, torus=TRUE) @@ -209,7 +209,7 @@

Examples

x <- matrix(rnorm(dim(W)[1]), ncol=1) system.time(ee <- powerWeights(W, rho=0.3, X=x)) #> user system elapsed -#> 0.011 0.000 0.011 +#> 0.009 0.000 0.009 str(as(ee, "matrix")) #> num [1:3600, 1] -0.383 0.207 -0.731 1.552 0.32 ... #> - attr(*, "dimnames")=List of 2 diff --git a/docs/reference/spautolm.html b/docs/reference/spautolm.html index 6695535..9b01ce1 100644 --- a/docs/reference/spautolm.html +++ b/docs/reference/spautolm.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4
@@ -422,7 +422,7 @@

Examples

data=nydata, listw=listw_NY, family="SAR", method="eigen", control=list(pre_eig=eigs))) #> user system elapsed -#> 0.313 0.000 0.314 +#> 0.195 0.001 0.196 res <- summary(esar1f) print(res) #> @@ -467,7 +467,7 @@

Examples

system.time(esar1M <- spautolm(Z ~ PEXPOSURE + PCTAGE65P + PCTOWNHOME, data=nydata, listw=listw_NY, family="SAR", method="Matrix")) #> user system elapsed -#> 0.426 0.000 0.458 +#> 0.228 0.000 0.229 summary(esar1M) #> #> Call: @@ -498,7 +498,7 @@

Examples

data=nydata, listw=listw_NY, family="SAR", method="Matrix", control=list(super=TRUE))) #> user system elapsed -#> 0.373 0.001 0.379 +#> 0.201 0.000 0.204 summary(esar1M) #> #> Call: @@ -558,7 +558,7 @@

Examples

system.time(esar1wM <- spautolm(Z ~ PEXPOSURE + PCTAGE65P + PCTOWNHOME, data=nydata, listw=listw_NY, weights=POP8, family="SAR", method="Matrix")) #> user system elapsed -#> 0.382 0.000 0.385 +#> 0.218 0.000 0.219 summary(esar1wM) #> #> Call: @@ -675,7 +675,7 @@

Examples

system.time(ecar1M <- spautolm(Z ~ PEXPOSURE + PCTAGE65P + PCTOWNHOME, data=nydata, listw=listw_NY, family="CAR", method="Matrix")) #> user system elapsed -#> 0.441 0.000 0.444 +#> 0.245 0.000 0.247 summary(ecar1M) #> #> Call: @@ -737,7 +737,7 @@

Examples

system.time(ecar1wM <- spautolm(Z ~ PEXPOSURE + PCTAGE65P + PCTOWNHOME, data=nydata, listw=listw_NY, weights=POP8, family="CAR", method="Matrix")) #> user system elapsed -#> 0.437 0.001 0.456 +#> 0.256 0.000 0.259 summary(ecar1wM) #> #> Call: @@ -767,7 +767,7 @@

Examples

# } # \dontrun{ require("sf", quietly=TRUE) -nc.sids <- st_read(system.file("shapes/sids.shp", package="spData")[1], quiet=TRUE) +nc.sids <- st_read(system.file("shapes/sids.gpkg", package="spData")[1], quiet=TRUE) ft.SID74 <- sqrt(1000)*(sqrt(nc.sids$SID74/nc.sids$BIR74) + sqrt((nc.sids$SID74+1)/nc.sids$BIR74)) lm_nc <- lm(ft.SID74 ~ 1) diff --git a/docs/reference/stsls.html b/docs/reference/stsls.html index 8cb5c1c..f5ec277 100644 --- a/docs/reference/stsls.html +++ b/docs/reference/stsls.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 diff --git a/docs/reference/trW.html b/docs/reference/trW.html index 89ade63..7914052 100644 --- a/docs/reference/trW.html +++ b/docs/reference/trW.html @@ -17,7 +17,7 @@ spatialreg - 1.3-3 + 1.3-4 @@ -133,7 +133,7 @@

See also

Examples

require("sf", quietly=TRUE) 
-columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1], quiet=TRUE)
+columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")[1], quiet=TRUE)
 #require(spdep, quietly=TRUE)
 col.gal.nb <- spdep::read.gal(system.file("weights/columbus.gal", package="spData")[1])
 listw <- spdep::nb2listw(col.gal.nb)
@@ -150,11 +150,11 @@ 

Examples

set.seed(1100) system.time(trMC <- trW(W, type="MC")) #> user system elapsed -#> 0.006 0.000 0.006 +#> 0.005 0.000 0.006 str(trMC) #> num [1:30] 0 10.91 3.69 5.36 3.64 ... #> - attr(*, "sd")= num [1:30] NA NA 0.598 0.495 0.489 ... -#> - attr(*, "timings")= Named num [1:2] 0.006 0.006 +#> - attr(*, "timings")= Named num [1:2] 0.005 0.006 #> ..- attr(*, "names")= chr [1:2] "user.self" "elapsed" #> - attr(*, "type")= chr "MC" #> - attr(*, "n")= int 49 @@ -180,10 +180,10 @@

Examples

#> [1] TRUE system.time(trMat <- trW(W, m=24, type="mult")) #> user system elapsed -#> 0.005 0.000 0.005 +#> 0.002 0.000 0.003 str(trMat) #> num [1:24] 0 10.91 3.65 5.62 3.66 ... -#> - attr(*, "timings")= Named num [1:2] 0.005 0.005 +#> - attr(*, "timings")= Named num [1:2] 0.002 0.003 #> ..- attr(*, "names")= chr [1:2] "user.self" "elapsed" #> - attr(*, "type")= chr "mult" #> - attr(*, "n")= int 49 @@ -192,11 +192,11 @@

Examples

set.seed(1) system.time(trMC <- trW(W, m=24, type="MC")) #> user system elapsed -#> 0.009 0.000 0.009 +#> 0.006 0.000 0.006 str(trMC) #> num [1:24] 0 10.91 2.44 4.97 2.82 ... #> - attr(*, "sd")= num [1:24] NA NA 0.618 0.501 0.451 ... -#> - attr(*, "timings")= Named num [1:2] 0.008 0.009 +#> - attr(*, "timings")= Named num [1:2] 0.006 0.006 #> ..- attr(*, "names")= chr [1:2] "user.self" "elapsed" #> - attr(*, "type")= chr "MC" #> - attr(*, "n")= int 49 @@ -206,10 +206,10 @@

Examples

listwS <- similar.listw(listw) system.time(trmom <- trW(listw=listwS, m=24, type="moments")) #> user system elapsed -#> 0.128 0.000 0.128 +#> 0.109 0.000 0.110 str(trmom) #> num [1:24] 0 124.2 32.7 63.7 33.2 ... -#> - attr(*, "timings")= Named num [1:2] 0.128 0.128 +#> - attr(*, "timings")= Named num [1:2] 0.109 0.109 #> ..- attr(*, "names")= chr [1:2] "user.self" "elapsed" #> - attr(*, "type")= chr "moments" #> - attr(*, "n")= int 506 @@ -225,7 +225,7 @@

Examples

} system.time(trmomp <- trW(listw=listwS, m=24, type="moments")) #> user system elapsed -#> 0.125 0.000 0.127 +#> 0.107 0.000 0.108 if(!get.mcOption()) { set.ClusterOption(NULL) stopCluster(cl)