Simulate the Spatial Autoregressive Model with Autoregressive Errors
sim_sarar.Rd
Generate y
values for the "combo" / SARAR / SAC model.
Usage
sim_sarar(u, xb, listw, rho = 0.5, lambda = 0.2, model = c("sar", "ma"))
Arguments
- u
an error vector
- xb
predicted x values as calculated by
make_xb()
- listw
a
listw
object generated withsim_grid_listw()
.- rho
the spatial autoregressive coefficient for the spatially lagged dependent variable.
- 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.