This function generates a pure spatial error process, which is useful when
you only want to simulate the error structure without including any deterministic
part (i.e., no xb term). This can be used to analyze or simulate the behavior
of spatially dependent errors in isolation.
Usage
sim_error(u, listw, lambda = 0.5, model = c("sar", "ma"))
Value
A numeric vector
Arguments
u
an error vector
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.