Learn R Programming

spsur (version 1.0.2.1)

lrtestspsur: Likelihood Ratio tests for the specification of spatial SUR models.

Description

The function computes a set of Likelihood Ratio tests, LR, that help the user to select the spatial structure of the SUR model. To achieve this goal, lrtestspsur needs to estimate the nested SUR models (options: "sim", "slx", "slm", "sem", "sdm", "sdem", and "sarar"), using the function spsurml.

The nested models listed above are compared using ANOVA tables and LR tests.

Usage

lrtestspsur (objectr,  objectu = NULL)

Value

Object of anova class including, the list of models and, for each model, the logLik, degrees of freedom and AIC. If two nested models have been included as arguments, the corresponding LR-test and its p-value associated.

Arguments

objectr

An spsur object created by spsurml, spsur3sls or spsurtime.

objectu

An spsur object created by spsurml, spsur3sls or spsurtime which nests objectr. Default = NULL

Author

Fernando Lopezfernando.lopez@upct.es
Roman Minguezroman.minguez@uclm.es
Jesus Murjmur@unizar.es

Details

A fundamental result in maximum-likelihood estimation shows that if model A is nested in model B, by a set of n restrictions on the parameters of model B, then, as the sample size increases, the test statistic: \(-2log[l(H_{0}) / l(H_{A})]\) is a \(\chi^{2}(n)\), being l(H_0 the estimated likelihood under the null hypothesis (model A) and l(H_A the estimated likelihood under the alternative hypothesis (model B).

The list of (spatial) models that can be estimated with the function spsurml includes the following (in addition to the "slx" and "sdem"):

  • "sim": SUR model with no spatial effects $$ y_{tg} = X_{tg} \beta_{g} + \epsilon_{tg} $$

  • "slm": SUR model with spatial lags of the explained variables $$y_{tg} = \rho_{g} Wy_{tg} + X_{tg} \beta_{g} + \epsilon_{tg} $$

  • "sem": SUR model with spatial errors $$ y_{tg} = X_{tg} \beta_{g} + u_{tg} $$ $$ u_{tg} = \lambda_{g} Wu_{tg} + \epsilon_{tg} $$

  • "sdm": SUR model of the Spatial Durbin type $$ y_{tg} = \rho_{g} Wy_{tg} + X_{tt} \beta_{g} + WX_{tg} \theta_{g} + \epsilon_{tg} $$

  • "sarar": SUR model with spatial lags of the explained variables and spatial errors $$ y_{tg} = \rho_{g} Wy_{tg} + X_{tg} \beta_{g} + u_{tg} $$ $$ u_{tg} = \lambda_{g} W u_{tg} + \epsilon_{tg} $$

This collection of models can be compared, on objective bases, using the LR principle and the following nesting relations:

  • "sim" vs either "slx", slm", "sem", "sdm", "sarar"

  • "slm" vs either "sdm", "sarar"

  • "sem" vs either "sdm", "sdem", "sarar"

  • "slx" vs either "sdm", "sdem"

References

  • Mur, J., Lopez, F., and Herrera, M. (2010). Testing for spatial effects in seemingly unrelated regressions. Spatial Economic Analysis, 5(4), 399-440.

  • 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.

See Also

spsurml, lmtestspsur

Examples

Run this code
#################################################
######## CROSS SECTION DATA (nG=1; nT>1) ########
#################################################

#### Example 1: Spatial Phillips-Curve. Anselin (1988, p. 203)
rm(list = ls()) # Clean memory
data("spc", package = "spsur")
lwspc <- spdep::mat2listw(Wspc, style = "W")
Tformula <- WAGE83 | WAGE81 ~ UN83 + NMR83 + SMSA | UN80 + NMR80 + SMSA
spcsur.slm <- spsurml(formula = Tformula, data = spc, 
                      type = "slm", listw = lwspc)
## ANOVA Table SLM model
lrtestspsur(spcsur.slm)    
## Test ANOVA SIM versus SLM
spcsur.sim <- spsurml(formula = Tformula, data = spc, 
                      type = "sim", listw = lwspc)
lrtestspsur(spcsur.sim, spcsur.slm)

## VIP: If you want to examine a particular example eliminate '#' and 
## execute the code of the example (they have been commented to 
## pass the checking time in CRAN)

## VIP: The output of the whole set of the examples can be examined 
## by executing demo(demo_lrtestspsur, package="spsur")

## Test ANOVA SLM vs SDM
#spcsur.sdm <- spsurml(formula = Tformula, data = spc, 
#                      type = "sdm", listw = lwspc)
#lrtestspsur(spcsur.slm, spcsur.sdm)
## Test ANOVA SEM vs SDM
#spcsur.sem <- spsurml(formula = Tformula, data = spc, 
#                      type = "sem", listw = lwspc)
#lrtestspsur(spcsur.sem, spcsur.sdm)

Run the code above in your browser using DataLab