Simulate General Nested Model
sim_gns.Rd
Simulate General Nested Model
Usage
sim_gns(u, xb, wxg, 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()
- wxg
predicted spatial lag effect as calculated by
make_wxg()
- 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.