Skip to content

Commit 3faf1fe

Browse files
committed
add AK test for stsls
1 parent 93683ed commit 3faf1fe

File tree

6 files changed

+412
-385
lines changed

6 files changed

+412
-385
lines changed

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: spatialreg
2-
Version: 1.3-5
3-
Date: 2024-08-19
2+
Version: 1.3-6
3+
Date: 2024-11-19
44
Title: Spatial Regression Analysis
55
Encoding: UTF-8
66
Authors@R: c(person("Roger", "Bivand", role = c("cre", "aut"), email = "[email protected]", comment=c(ORCID="0000-0003-2392-6140")),

NAMESPACE

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ 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")
19+
"subset.listw", "spweights.constants")
2020

2121
import(Matrix#, except=c("expm")
2222
)

R/kpgm_new.R

+5-5
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,9 @@ impacts.Gmsar <- function(obj, ..., n=NULL, tr=NULL, R=NULL, listw=NULL,
518518
####SARAR model
519519

520520
gstsls<-function (formula, data = list(), listw, listw2=NULL,
521-
na.action = na.fail, zero.policy = attr(listw, "zero.policy"), pars=NULL, scaleU=FALSE,
522-
control = list(), verbose = NULL, method = "nlminb", robust = FALSE,
523-
legacy = FALSE, W2X = TRUE )
521+
na.action = na.fail, zero.policy = attr(listw, "zero.policy"), pars=NULL,
522+
scaleU=FALSE, control = list(), verbose = NULL, method = "nlminb",
523+
robust = FALSE, legacy = FALSE, W2X = TRUE, sig2n_k=FALSE)
524524
{
525525

526526

@@ -590,7 +590,7 @@ gstsls<-function (formula, data = list(), listw, listw2=NULL,
590590
}
591591

592592
instr <- cbind(WX, WWX)
593-
firststep <- tsls(y = y, yend = wy, X = x, Zinst = instr, robust = robust, legacy = legacy)
593+
firststep <- tsls(y = y, yend = wy, X = x, Zinst = instr, robust = robust, legacy = legacy, sig2n_k=sig2n_k)
594594

595595
ukp <- residuals(firststep)
596596

@@ -641,7 +641,7 @@ gstsls<-function (formula, data = list(), listw, listw2=NULL,
641641
colnames(xt) <- xcolnames
642642
colnames(wyt) <- c("Rho_Wy")
643643
secstep <- tsls(y = yt, yend = wyt, X = xt, Zinst = instr,
644-
robust = robust, legacy = legacy)
644+
robust = robust, legacy = legacy, sig2n_k=sig2n_k)
645645
rho<-secstep$coefficients[1]
646646
coef.sac<-secstep$coefficients
647647
rest.se <- sqrt(diag(secstep$var))

0 commit comments

Comments
 (0)