Skip to content
Prev 15473 / 29559 Next

GMM-2SLS estimation in spdep

On Mon, 25 Jun 2012, Pelin Ak?ag?n wrote:

            
Please refer to the code, either in your console, from the source package, 
or online at R-Forge:

https://r-forge.r-project.org/scm/viewvc.php/pkg/R/kpgm_new.R?view=markup&root=spdep

for GMerrorsar and gstsls, and:

https://r-forge.r-project.org/scm/viewvc.php/pkg/R/s2sls.R?view=markup&root=spdep

for stsls. You will see quite a lot of choices, often caused by the 
difficulty of getting the GM argmin to converge numerically. If you read 
gstsls at the foot of the first file, you see that it calls tsls from the 
second file in the first stage, then copies the argmin section from 
GMerrorsar. Neither GMerrorsar not gstsls iterate their solutions. Note 
that GMerrorsar can also use the Arnold-Wied moments.
They are comparable in implementation terms, using to some extent the same 
underlying functions. Please also compare the code with that of the 
model-fitting functions in sphet, where again there is a good deal in 
common. I've included Gianfranco Piras as CC, because his views will be 
relevant for you.

Hope this helps,

Roger