wald_deltas {spsur} | R Documentation |
Wald tests for spatial parameters coefficients.
Description
Function wald_deltas
obtains Wald tests for linear
restrictions on the spatial coefficients of a SUR model that has been
estimated previously through the function spsurml
. The
restrictions can affect to coefficients of the same equation
(i.e., \lambda_{g}=\rho_{g} forall g
) or can involve coefficients
from different equations (i.e., \lambda_{g}=\lambda_{h}
). The
function has great flexibility in this respect. Note that
wald_deltas
only works 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_deltas
obtains the corresponding Wald statistic for
the null hypotheses specified by the user through the R row vector
and b column vector discussed, used also in spsurml
.
The function shows the resulting Wald test statistics and their
corresponding p-values.
Usage
wald_deltas (obj , R , b)
Arguments
obj |
|
R |
A row vector of order (1xGr) or (1x2Gr) showing
the set of r linear constraints on the spatial parameters. The
last case is reserved to "sarar" models where there appear
G parameters |
b |
A column vector of order (rx1) with the values
of the linear restrictions on the |
Value
Object of htest
including the Wald
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 |
See Also
Examples
#################################################
######## CROSS SECTION DATA (G>1; Tm=1) ########
#################################################
rm(list = ls()) # Clean memory
data(spc, package = "spsur")
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 of the lambda parameters of both equations.
R1 <- matrix(c(1,-1), nrow=1)
b1 <- matrix(0, ncol=1)
wald_deltas(spcsur.slm, R = R1, b = b1)