## VIP: The output of the whole set of the examples can be examined
## by executing demo(demo_wald_betas, package="spsur")
#################################################
######## CROSS SECTION DATA (G=1; Tm>1) ########
#################################################
##### Example 1: Spatial Phillips-Curve. Anselin (1988, p. 203)
rm(list = ls()) # Clean memory
data(spc)
lwspc <- spdep::mat2listw(Wspc, style = "W")
Tformula <- WAGE83 | WAGE81 ~ UN83 + NMR83 + SMSA | UN80 + NMR80 + SMSA
### Estimate SUR-SLM model
spcsur.slm <- spsurml(formula = Tformula, data = spc,
type = "slm", listw = lwspc)
summary(spcsur.slm)
### H_0: equality between SMSA coefficients in both equations.
R1 <- matrix(c(0,0,0,1,0,0,0,-1), nrow=1)
b1 <- matrix(0, ncol=1)
wald_betas(spcsur.slm, R = R1, b = b1)
Run the code above in your browser using DataLab