LR.sarlm {spdep} | R Documentation

## Likelihood ratio test

### Description

The `LR.sarlm()` function provides a likelihood ratio test for objects for which a `logLik()` function exists for their class, or for objects of class `logLik`. `LR1.sarlm()` and `Wald1.sarlm()` are used internally in `summary.sarlm()`, but may be accessed directly; they report the values respectively of LR and Wald tests for the absence of spatial dependence in spatial lag or error models.

### Usage

    LR.sarlm(x, y)
    logLik.sarlm(object, ...)
    LR1.sarlm(object)
    Wald1.sarlm(object)

### Arguments

`x` | a `logLik` object or an object for which a `logLik()` function exists
`y` | a `logLik` object or an object for which a `logLik()` function exists
`object` | a `sarlm` object from `lagsarlm()` or `errorsarlm()`
`...` | other arguments to logLik()

### Value

`LR.sarlm()` returns an object of class `htest` with:

`statistic` | value of statistic
`parameter` | degrees of freedom
`p.value` | Probability value
`estimate` | Log likelihood values of compared models
`method` | "Likelihood ratio for spatial linear models"

`logLik.sarlm()` returns an object of class `logLik` `LR1.sarlm` and `Wald1.sarlm` returm objects of class `htest`

### Note

The numbers of degrees of freedom returned by `logLik.sarlm()` include nuisance parameters, that is the number of regression coefficients, plus sigma, plus spatial parameter esitmate(s).

### Author(s)

Roger Bivand Roger.Bivand@nhh.no

### See Also

`logLik.lm`, `anova.sarlm`

### Examples

    data(columbus)
    mixed <- lagsarlm(CRIME ~ HOVAL + INC, data=columbus, nb2listw(col.gal.nb),
      type="mixed")
    error <- errorsarlm(CRIME ~ HOVAL + INC, data=columbus, nb2listw(col.gal.nb))
    LR.sarlm(mixed, error)

[Package spdep version 0.3-25 Index]