Likelihood Ratio Test for Spatial Linear Models

DESCRIPTION:

Computes a likelihood ratio test for spatial linear models.

USAGE:

lrt.slm(object, parameters=NULL, coefficients=NULL, ...) 

REQUIRED ARGUMENTS:

object
an object of class "slm". The likelihood ratio test is performed by restricting the parameters used to define the model to a smaller class. Using the arguments below, the covariance matrix parameters (but not the scale parameter) or the linear model parameters can be restricted by setting them to known or hypothesized values.

OPTIONAL ARGUMENTS:

parameters
the fixed values of the covariance matrix parameters specified by the null hypothesis. Vector parameters can either be a named vector where the names of the vector are names from names(object$parameters) and the values are the values fixed by the null hypothesis. Alternatively, vector parameters can be the same length as object$parameters, with parameters which are free to vary specified using NAs. If NULL, then no covariance matrix parameter is fixed by the null hypothesis and all are free to vary.
coefficients
the fixed values of the linear model coefficients specified by the null hypothesis. Vector coefficients can either be a named vector where the names of the vector are names from names(coef(object)) and the values are the values fixed by the null hypothesis. Alternatively, vector coefficients can be the same length as object$coefficients, with coefficients which are free to vary specified using NAs. If NULL, then all coefficients are free to vary and none are fixed by the null hypothesis.
...
arguments to be passed on to the routine slm.nlminb (if optimization of the log-likelihood under the null hypothesis is required). See routine slm.nlminb.

VALUE:

a list containing the following elements:
chisquared
(asymptotic) chi-squared likelihood ratio statistic.
p.value
the (two-sided) p-value for the statistic chisquared.
df
the degrees of freedom used to compute p.value.
parameters
the parameters fit under the null hypothesis.
coefficients
the coefficients fit under the null hypothesis.

DETAILS:

lrt.slm is used to perform likelihood ratio tests on the covariance matrix parameters and the linear model coefficients of a spatial regression model. Elements of either of these vectors can be specified to fixed values, or can be left free to vary. Each (linearly independent) parameter which is restricted to a fixed values contributes one degree of freedom to the chi-squared statistic used in performing the likelihood ratio test.

Likelihood ratio tests compare the optimal likelihood under two hypothesis. In lrt.slm, the alternative hypothesis is that all model parameters are free to vary, so the maximum likelihood estimates obtained from slm and used as input to lrt.slm maximize the likelihood hypothesis under the alternative hypothesis. The null hypothesis is obtained by restricting model parameters to fixed values. If the null hypothesis is true, then twice the log of the ratio of the optimal likelihoods under the null and alternative hypotheses is asymptotically distributed as a chi-squared statistic with degrees of freedom equal to the number of fixed parameters (see Haining, 1990, page 143). Using this chi-squared distribution, the significance level is easily obtained.

Closed form expressions for the optimal linear model coefficients are available if the covariance matrix parameters (except the scale parameter) are known. In this case the likelihood ratio test will be relatively inexpensive to compute. However, if one or more covariance matrix parameters is not known, an iterative algorithm must be used to compute the optimal log-likelihood under the alternative hypothesis. In this case, the optimization algorithm used is identical to the algorithm used by the routine slm, and can be quite cpu intensive.

lrt.slm does not allow likelihood ratio tests on the scale parameter.

REFERENCES:

Haining, R. (1990). Spatial Data Analysis in the Social and Environmental Sciences. Cambridge University Press, London.

SEE ALSO:

, .

EXAMPLES:

sids.slm <- slm(sid.ft ~ nwbirths.ft, cov.family=CAR, data=sids, 
        subset=-4, spatial.arglist=list(weights=1/sids$births, 
        neighbor=sids.neighbor)) 
lrt(sids.slm, 0.12, c(NA, 0)) 
lrt(sids.slm, 0.12, c("nwbirths.ft"=0))  # another way to specify the test