Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit79262dd

Browse files
committed
move Durbin factor functions to spdep
1 parentc4d6eaf commit79262dd

File tree

4 files changed

+29
-52
lines changed

4 files changed

+29
-52
lines changed

‎DESCRIPTION‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: spatialreg
22
Version: 1.3-7
3-
Date: 2025-02-28
3+
Date: 2025-04-10
44
Title: Spatial Regression Analysis
55
Encoding: UTF-8
66
Authors@R: c(person("Roger", "Bivand", role = c("cre", "aut"), email = "Roger.Bivand@nhh.no", comment=c(ORCID="0000-0003-2392-6140")),
@@ -27,7 +27,7 @@ Authors@R: c(person("Roger", "Bivand", role = c("cre", "aut"), email = "Roger.Bi
2727
person(given = "JuanTomas", family = "Sayago", role = c("ctb"), email = "juantomas.sayago@gmail.com"),
2828
person("Michael", "Tiefelsdorf", role = "ctb"))
2929
Depends: R (>= 3.3.0), spData (>= 2.3.1), Matrix, sf
30-
Imports: spdep (>= 1.3-1), coda, methods, MASS, boot, splines, LearnBayes,
30+
Imports: spdep (>= 1.3-11), coda, methods, MASS, boot, splines, LearnBayes,
3131
nlme, multcomp
3232
Suggests: parallel, RSpectra, tmap, foreign, spam, knitr, lmtest, expm,
3333
sandwich, rmarkdown, igraph (>= 2.0.0), tinytest

‎NAMESPACE‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ importFrom("stats", "lm.fit", "as.formula", "coef", "lm", "model.extract",
1616
importFrom("spdep", "is.symmetric.glist", "lag.listw", "card",
1717
"nb2listw", "n.comp.nb", "listw2U", "listw2mat", "Szero", "listw2sn",
1818
"mat2listw", "is.symmetric.nb", "chkIDs", "get.spChkOption",
19-
"subset.listw", "spweights.constants")
19+
"subset.listw", "spweights.constants", "have_factor_preds_mf",
20+
"warn_factor_preds")
2021

2122
import(Matrix#, except=c("expm")
2223
)

‎R/cat_durbin.R‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎inst/tinytest/test_Durbin_factor.R‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@ library(spatialreg)
22
data(oldcol,package="spdep")
33
lw<-spdep::nb2listw(COL.nb)
44
COL.OLD$fEW<-factor(COL.OLD$EW)
5-
COL.OLD$fDISCBD<- cut(COL.OLD$DISCBD, c(0,1.5,3,4.5,6))
5+
COL.OLD$fDISCBD<-ordered(cut(COL.OLD$DISCBD, c(0,1.5,3,4.5,6)))
66
f<- formula(CRIME~INC+HOVAL+fDISCBD*fEW)
7-
expect_warning(COL.SLX<- lmSLX(f,data=COL.OLD,lw,Durbin=TRUE))
8-
expect_warning(COL.SLX<- lmSLX(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
9-
expect_warning(COL.SLX<- lmSLX(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fEW))
10-
expect_silent(COL.SLX<- lmSLX(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
11-
expect_warning(COL.err<- errorsarlm(f,data=COL.OLD,lw,Durbin=TRUE))
12-
expect_warning(COL.err<- errorsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
13-
expect_warning(COL.err<- errorsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
14-
expect_silent(COL.err<- errorsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
15-
expect_warning(COL.lag<- lagsarlm(f,data=COL.OLD,lw,Durbin=TRUE))
16-
expect_warning(COL.lag<- lagsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
17-
expect_warning(COL.lag<- lagsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
18-
expect_silent(COL.lag<- lagsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
19-
expect_warning(COL.sac<- sacsarlm(f,data=COL.OLD,lw,Durbin=TRUE))
20-
expect_warning(COL.sac<- sacsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
21-
expect_warning(COL.sac<- sacsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
22-
expect_silent(COL.sac<- sacsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
23-
expect_warning(COL.lag<- spBreg_lag(f,data=COL.OLD,lw,Durbin=TRUE))
24-
expect_warning(COL.lag<- spBreg_lag(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
25-
expect_warning(COL.lag<- spBreg_lag(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
26-
expect_silent(COL.lag<- spBreg_lag(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
27-
expect_warning(COL.err<- spBreg_err(f,data=COL.OLD,lw,Durbin=TRUE))
28-
expect_warning(COL.err<- spBreg_err(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
29-
expect_warning(COL.err<- spBreg_err(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
30-
expect_silent(COL.err<- spBreg_err(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
7+
expect_warning(COL.SLX0<- lmSLX(f,data=COL.OLD,lw,Durbin=TRUE))
8+
expect_warning(COL.SLX1<- lmSLX(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
9+
expect_warning(COL.SLX2<- lmSLX(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fEW))
10+
expect_silent(COL.SLX3<- lmSLX(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
11+
expect_warning(COL.err0<- errorsarlm(f,data=COL.OLD,lw,Durbin=TRUE))
12+
expect_warning(COL.err1<- errorsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
13+
expect_warning(COL.err2<- errorsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
14+
expect_silent(COL.err3<- errorsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
15+
expect_warning(COL.lag0<- lagsarlm(f,data=COL.OLD,lw,Durbin=TRUE))
16+
expect_warning(COL.lag1<- lagsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
17+
expect_warning(COL.lag2<- lagsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
18+
expect_silent(COL.lag3<- lagsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
19+
expect_warning(COL.sac0<- sacsarlm(f,data=COL.OLD,lw,Durbin=TRUE))
20+
expect_warning(COL.sac1<- sacsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
21+
expect_warning(COL.sac2<- sacsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
22+
expect_silent(COL.sac3<- sacsarlm(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
23+
expect_warning(COL.lag0<- spBreg_lag(f,data=COL.OLD,lw,Durbin=TRUE))
24+
expect_warning(COL.lag1<- spBreg_lag(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
25+
expect_warning(COL.lag2<- spBreg_lag(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
26+
expect_silent(COL.lag3<- spBreg_lag(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
27+
expect_warning(COL.err0<- spBreg_err(f,data=COL.OLD,lw,Durbin=TRUE))
28+
expect_warning(COL.err1<- spBreg_err(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD*fEW))
29+
expect_warning(COL.err2<- spBreg_err(f,data=COL.OLD,lw,Durbin=~INC+HOVAL+fDISCBD))
30+
expect_silent(COL.err3<- spBreg_err(f,data=COL.OLD,lw,Durbin=~INC+HOVAL))
3131

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp