lr_betas: Likelihood ratio for testing homogeneity constraints on beta...

View source: R/lr_betas.R

lr_betasR Documentation

Likelihood ratio for testing homogeneity constraints on beta coefficients of the SUR equations.

Description

Function lr_betas obtains a Likelihood Ratio test, LR in what follows, with the purpose of testing if some of the β coefficients in the G equations of the SUR model are equal. This function has a straightforward application, especially when G=1, to the case of testing for the existence of structural breaks in the β parameters.

The function can test for the homogeneity of only one coefficient, of a few of them or even the homogeneity of all the slope terms. The testing procedure implies, first, the estimation of both a constrained and a unconstrained model and, second, the comparison of the log-likelihoods to compute the LR statistics.

@usage lr_betas (obj, R, b)

Usage

lr_betas(obj, R, b)

Arguments

obj

An spsur object created by spsurml, spsur3sls or spsurtime.

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.

Value

Object of htest including the LR statistic, the corresponding p-value, the degrees of freedom and the values of the sample estimates.

Author(s)

Fernando Lopez fernando.lopez@upct.es
Roman Minguez roman.minguez@uclm.es
Jesus Mur jmur@unizar.es

References

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

  • Minguez, R., Lopez, F.A. and Mur, J. (2022). spsur: An R Package for Dealing with Spatial Seemingly Unrelated Regression Models. Journal of Statistical Software, 104(11), 1–43. <doi:10.18637/jss.v104.i11>

See Also

spsurml, spsurtime, wald_betas

Examples


## VIP: The output of the whole set of the examples can be examined 
## by executing demo(demo_lr_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
### H0: equal beta for SMSA in both equations.
R <- matrix(c(0,0,0,1,0,0,0,-1), nrow=1)
b <- matrix(0, ncol=1)
spcsur.slm <- spsurml(formula = Tformula, data = spc, 
                      type = "slm", listw = lwspc)
summary(spcsur.slm)
lr_betas(spcsur.slm, R = R, b = b)

### Estimate restricted SUR-SLM model
spcsur.slmr <- spsurml(formula = Tformula, data = spc, 
                      type = "slm", listw = lwspc,
                      R = R, b = b)
summary(spcsur.slmr)


spsur documentation built on Oct. 30, 2022, 1:06 a.m.