Description Usage Arguments Value References Examples
View source: R/gs2slshet.R View source: R/impacts.R
Generate impacts for objects of class sarar_gmm created in sphet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
obj |
A spreg spatial regression object created by |
... |
Arguments passed through to methods in the coda package |
tr |
A vector of traces of powers of the spatial weights matrix created using |
R |
If given, simulations are used to compute distributions for the impact measures, returned as |
listw |
a listw object |
evalues |
vector of eigenvalues of spatial weights matrix for impacts calculations |
tol |
Argument passed to |
empirical |
Argument passed to |
Q |
default NULL, else an integer number of cumulative power series impacts to calculate if |
KPformula |
default FALSE, else inference of the impacts based on Kelejian and Piras (2020) |
prt |
prints the KP summary of the VC matrix |
Estimate of the Average Total, Average Direct, and Average Indirect Effects
Roger Bivand, Gianfranco Piras (2015). Comparing Implementations of Estimation Methods for Spatial Econometrics. Journal of Statistical Software, 63(18), 1-36. https://www.jstatsoft.org/v63/i18/. Harry Kelejian, Gianfranco Piras (2020). Spillover effects in spatial models: Generalization and extensions. Journal of Regional Science, 60(3), 425-442. https://onlinelibrary.wiley.com/doi/10.1111/jors.12476
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | data(boston, package="spData")
Wb <- as(spdep::nb2listw(boston.soi), "CsparseMatrix")
ev <- eigen(Wb)$values
trMatb <- spatialreg::trW(Wb, type="mult")
sarar1 <- spreg(log(CMEDV) ~ CRIM + ZN + INDUS + CHAS + I(NOX^2) +
I(RM^2) + AGE + log(DIS) + log(RAD) + TAX + PTRATIO + B + log(LSTAT),
data = boston.c, listw = Wb, model = "sarar")
summary(sarar1)
impacts(sarar1, KPformula = TRUE)
summary(impacts(sarar1, tr = trMatb, R=1000), zstats=TRUE, short=TRUE)
summary(impacts(sarar1, evalues = ev, R=1000), zstats=TRUE, short=TRUE)
sarar2 <- spreg(log(CMEDV) ~ CRIM + ZN + INDUS + CHAS + I(NOX^2) +
I(RM^2) + AGE + log(DIS) + log(RAD) + TAX + PTRATIO + B + log(LSTAT),
data = boston.c, listw = Wb, model = "sarar", Durbin = TRUE)
summary(sarar2)
impacts(sarar2, evalues = ev, KPformula = TRUE)
impacts(sarar2, evalues = ev)
impacts(sarar2, listw = spdep::nb2listw(boston.soi))
impacts(sarar2, tr = trMatb)
summary(impacts(sarar2, evalues = ev, R=1000), zstats=TRUE, short=TRUE)
sarar3 <- spreg(log(CMEDV) ~ CRIM + ZN + INDUS + CHAS + I(NOX^2) +
I(RM^2) + AGE + log(DIS) + log(RAD) + TAX + PTRATIO + B + log(LSTAT),
data = boston.c, listw = Wb, model = "sarar", Durbin = ~CRIM + TAX)
summary(sarar3)
impacts(sarar3, evalues = ev)
impacts(sarar3, evalues = ev, KPformula = TRUE)
impacts(sarar3, evalues = ev, KPformula = TRUE, tr = trMatb)
impacts(sarar3, listw = spdep::nb2listw(boston.soi))
impacts(sarar3, tr = trMatb)
summary(impacts(sarar3, listw = spdep::nb2listw(boston.soi), R=1000), zstats=TRUE, short=TRUE)
sarar4 <- spreg(log(CMEDV) ~ CRIM + ZN + INDUS + CHAS + I(NOX^2) +
I(RM^2) + AGE + log(DIS) + log(RAD) + TAX + PTRATIO + B ,
data = boston.c, listw = Wb, model = "sarar", Durbin = ~CRIM + TAX + log(LSTAT))
summary(sarar4)
impacts(sarar4, evalues = ev)
summary(impacts(sarar4, evalues = ev, R=1000), zstats=TRUE, short=TRUE)
sarar5 <- spreg(log(CMEDV) ~ CRIM + ZN + INDUS + CHAS + I(NOX^2) + I(RM^2) + AGE + log(DIS),
data = boston.c, listw = Wb, model = "sarar", Durbin = ~ TAX + log(LSTAT))
summary(sarar5)
impacts(sarar5, evalues = ev)
summary(impacts(sarar4, tr = trMatb, R=1000), zstats=TRUE, short=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.