r-spatial / spatialreg

spatialreg: spatial models estimation and testing
https://r-spatial.github.io/spatialreg/
43 stars 11 forks source link

Document method= and Durbin= arguments #27

Open angela-li opened 5 years ago

angela-li commented 5 years ago

We should document the following:

  1. The mentioned method= argument to functions now named lagsarlm(), errorsarlm() and sacsarlm(), that is the spdep maximum likelihood estimation functions;

  2. The recently updated and modified Durbin= argument to lagsarlm(), errorsarlm() and sacsarlm(), as well as lmSLX(), that is the functions in Halleck Vega and Elhorst (2015) named GNS, SDM, SDEM and SLX, the ones with WX included. In particular, the one-sided formula interface to the arguments permits subsets of X to be lagged. This came up in a discussion in an ERSA workshop in Vienna in 2016, that spatial lags of dummies may not make sense, so I implemented it to give us something to go on in the maximum likelihood setting.

  3. Very recently, I've fitted in Bayesian estimation for SEM, SDEM, SLM, SDM, SAC and GNS, using the same Durbin= framework, and the internals of Virgilio Goméz-Rubio and Abhirup Mallik's GSoC project in 2011, translating the Spatial Econometrics toolbox code for sar_g, sdm_g, sem_g and sac_g. It's still preliminary, was done for spReg_lag() earlier, and spReg_sem() and spReg_sac() at the last CRAN release. It's still rough, but does have impacts. SEM/SLM have Griddy Gibbs and Metropolis/Hastings for the spatial coefficients, SAC only has Metropolis/Hastings. None have heteroskedastic variance in the code, because it was hard getting it to work, and in the lag case meant doing much more computation in each iteration. I have bits of a script running against Virgilio's SEMCMC implementations, and INLA's "slm" latent model. If you've read this far, might doing something together for the JSS Bayesian SI make sense?

That's enough work for the five years starting 2019, right?

Originally posted by @rsbivand in https://github.com/r-spatial/spdep/issues/23#issuecomment-445935577