Skip to contents

Simulate Spatially Lagged X Error Model

Usage

sim_slx_error(u, xb, wxg, listw, lambda = 0.5, model = c("sar", "ma"))

Arguments

u

an error vector

xb

predicted x values as calculated by make_xb()

wxg

predicted spatial lag effect as calculated by make_wxg()

listw

a listw object generated with sim_grid_listw().

lambda

a value value between -1 and 1. The spatial autoregressive coefficient for the error term.

model

default "sar". Which model should be simulated. Provide "ma" for the moving average.

Value

A numeric vector