ntspreg: Estimates a Spatial AutoRegressive (SAR) lag model.

View source: R/stadl_models.R

ntspregR Documentation

Estimates a Spatial AutoRegressive (SAR) lag model.

Description

ntspreg estimates a Spatial AutoRegressive (SAR) model (spatialreg::lagsarlm) using the nearest neighbor spatial weights matrix you previously created and a linear regression model.

Usage

ntspreg(lmobj, wm)

Arguments

lmobj

An object created by the lm function.

wm

a list, which includes the spatial weights matrix, created by the make_ntspmat.

Value

The output will be SAR model estimated.

Examples

## Not run: 
sar_reex <- ntspreg(ols,wm)

## End(Not run)

judechays/STADL documentation built on May 12, 2022, 10:50 p.m.