Learn R Programming

spsur (version 1.0.0.4)

wald_betas: Wald tests on the beta coefficients of the equation of the SUR model

Description

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 \(\beta\) 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_spsur in the sense that the last function only allows to test for restrictions of homogeneity of subsets of \(\beta\) 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.

Usage

wald_betas(results, R, b)

Arguments

results

: An object created with spsurml or spsur3sls. This argument serves the user to indicate the spatial SUR model, previously estimated by maximum-likelihood or 3sls, where the set of linear restrictions are to be tested.

R

: A row vector of order \((1xPr)\) showing the set of r linear constraints on the \(\beta\) parameters. The first restriction appears in the first K terms in R, the second restriction in the next K terms and so on. Default = NULL.

b

: A column vector of order (rx1) with the values of the linear restrictions on the \(\beta\) parameters.

Value

The output of the function is very simple and consists of two pieces of information, the value of the Wald statistic and the corresponding p-value, plus the degrees of freedom of the test.

Wald stat The value of Wald test.
p_val The p-value of Wald test.
q Degrees of freedom of the corresponding \(\chi^{2}\) distribution.

References

  • L<U+00F3>pez, 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.

  • L<U+00F3>pez, F.A., Mart<U+00ED>nez-Ortiz, P.J., & Cegarra-Navarro, J.G. (2017). Spatial spillovers in public expenditure on a municipal level in Spain. Annals of Regional Science, 58(1), 39-65.

  • Mur, J., L<U+00F3>pez, F., and Herrera, M. (2010). Testing for spatial effects in seemingly unrelated regressions. Spatial Economic Analysis, 5(4), 399-440.

See Also

spsurml, spsur3sls, lr_betas_spsur

Examples

Run this code
# NOT RUN {
#################################################
######## CROSS SECTION DATA (G=1; Tm>1) ########
#################################################

#### Example 1: Spatial Phillips-Curve. Anselin (1988, p. 203)
rm(list = ls()) # Clean memory
data(spc)
Tformula <- WAGE83 | WAGE81 ~ UN83 + NMR83 + SMSA | UN80 + NMR80 + SMSA
## Estimate SUR-SLM model
spcsur.slm <- spsur3sls(Form = Tformula, data = spc, type = "slm", W = Wspc)
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_beta <- wald_betas(results = spcsur.slm, R = R1, b = b1)

## 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(results = spcsur.slm, R = R2, b = b2)
####################################
########  G=1; Tm>1         ########
####################################

#### Example 2: Homicides + Socio-Economics (1960-90)
# }
# NOT RUN {
## Usually takes 1-2 minutes maximum
data(NCOVR)
Tformula <- HR80  | HR90 ~ PS80 + UE80 | PS90 + UE90
#################################
## A SUR-SLM model
NCOVRSUR.slm <-spsurml(Form = Tformula, data = NCOVR, type = "slm", W = W)
summary(NCOVRSUR.slm)
R1 <- matrix(c(0,1,0,0,-1,0), nrow=1)
b1 <- matrix(0, ncol=1)
wald_betas(results = NCOVRSUR.slm, R = R1, b = b1)
# }

Run the code above in your browser using DataLab