| wald_betas | R Documentation |
The function wald_betas can be seen as a complement
to the restricted estimation procedures included in the functions
spsurml and spsur3sls.
wald_betas obtains Wald tests for sets of linear
restrictions on the coefficients β of the SUR model.
The restrictions may involve coefficients of the same equation or
coefficients from different equations. The function has great flexibility
in this respect. Note that wald_betas is more general than
lr_betas in the sense that the last function
only allows to test for restrictions of homogeneity of subsets of
β coefficients among the different equations in the SUR model,
and in a maximum-likelihood framework.
In order to work with wald_betas, the model on which the
linear restrictions are to be tested needs to exists as an spsur
object. Using the information contained in the object,
wald_betas obtains the corresponding Wald estatistic
for the null hypotheses specified by the user through the R row
vector and b column vector, used also in spsurml
and spsur3sls. The function shows the value of the Wald test
statistics and its associated p-values.
wald_betas (obj , R , b)
obj |
An |
R |
A row vector of order (1xPr) showing the set of r linear constraints on the β parameters. The first restriction appears in the first K terms in R, the second restriction in the next K terms and so on. |
b |
A column vector of order (rx1) with the values of the linear restrictions on the β parameters. |
Object of htest class including the Wald
statistic, the corresponding p-value, the degrees of
freedom and the values of the sample estimates.
| Fernando Lopez | fernando.lopez@upct.es |
| Roman Minguez | roman.minguez@uclm.es |
| Jesus Mur | jmur@unizar.es |
Lopez, F.A., Mur, J., and Angulo, A. (2014). Spatial model selection strategies in a SUR framework. The case of regional productivity in EU. Annals of Regional Science, 53(1), 197-220. <doi:10.1007/s00168-014-0624-2>
Mur, J., Lopez, F., and Herrera, M. (2010). Testing for spatial effects in seemingly unrelated regressions. Spatial Economic Analysis, 5(4), 399-440. <doi:10.1080/17421772.2010.516443>
Anselin, L. (2016) Estimation and Testing in the Spatial Seemingly Unrelated Regression (SUR). Geoda Center for Geospatial Analysis and Computation, Arizona State University. Working Paper 2016-01. <doi:10.13140/RG.2.2.15925.40163>
spsurml, spsur3sls, lr_betas
## 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)
### Estimate restricted SUR-SLM model
spcsur.slmr <- spsurml(formula = Tformula, data = spc,
type = "slm", listw = lwspc,
R = R1, b = b1)
summary(spcsur.slmr)
### H_0: equality between intercepts and SMSA coefficients in both equations.
R2 <- matrix(c(1,0,0,0,-1,0,0,0,0,0,0,1,0,0,0,-1),
nrow = 2, ncol = 8, byrow = TRUE)
b2 <- matrix(c(0,0),ncol=1)
wald_betas(spcsur.slm, R = R2, b = b2)
### Estimate restricted SUR-SLM model
spcsur.slmr2 <- spsurml(formula = Tformula, data = spc,
type = "slm", listw = lwspc,
R = R2, b = b2)
#####################################
######### G=1; Tm>1 ########
#####################################
##### Example 2: Homicides + Socio-Economics (1960-90)
#
rm(list = ls()) # Clean memory
### Read NCOVR.sf object
data(NCOVR, package = "spsur")
nbncovr <- spdep::poly2nb(NCOVR.sf, queen = TRUE)
### Some regions with no links...
lwncovr <- spdep::nb2listw(nbncovr, style = "W", zero.policy = TRUE)
Tformula <- HR80 | HR90 ~ PS80 + UE80 | PS90 + UE90
##################################
### A SUR-SLM model
NCOVRSUR.slm <-spsurml(formula = Tformula, data = NCOVR.sf,
type = "slm", listw = lwncovr,
method = "Matrix", zero.policy = TRUE,
control = list(fdHess = TRUE))
summary(NCOVRSUR.slm)
R1 <- matrix(c(0,1,0,0,-1,0), nrow=1)
b1 <- matrix(0, ncol=1)
wald_betas(NCOVRSUR.slm, R = R1, b = b1)
NCOVRSUR.slmr <-spsurml(formula = Tformula, data = NCOVR.sf,
type = "slm", listw = lwncovr,
method = "Matrix", zero.policy = TRUE,
control = list(fdHess = TRUE),
R = R1, b = b1)
summary(NCOVRSUR.slmr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.