Dr. Bivand,


Thanks for your reply, which was quite helpful. I will work on the source
code and try to get in touch if I get stuck at some point.


Best regards,


Pelin





On Tue, Jun 26, 2012 at 11:14 AM, Roger Bivand <Roger.Bivand@nhh.no> wrote:

> On Mon, 25 Jun 2012, Pelin Akçagün wrote:
>
>  Dr. Bivand,
>>
>>
>> Sorry for posting twice, there seemed to be a technical problem in my
>> e-mail account because of the character set, that is why the question was
>> repeated.
>>
>>
>> I have gone over the help pages, the sphet package and Dr. Piras’ recent
>> article, which were really helpful. This classification between
>> gstsls-stsls-GMerrorsar functions appeared in my mind as a result of this
>> reading material.
>>
>> However, I was in a doubt that I may be missing something. For instance in
>> the following code
>>
>>
>> stslslag.absfit <- stsls(absform, data=LAEA, listw=lwW)
>>
>> GMerr.absfit <- GMerrorsar(absform, data=LAEA, listw=lwW,
>> returnHcov=TRUE)
>>
>> gstsls.absfit <- gstsls(absform, data=LAEA, listw=lwW)
>>
>>
>> This already gives me the STSLS, GM SAR and GM SARAR estimators. I wanted
>> to be sure that those three estimators rely on the same methodology so
>> that
>> they can be comparable.
>>
>> To be more specific, does the GM estimation for this spatial cross
>> sectional model rests upon a numerical Hessian approximation based on OLS
>> residuals? And in the presence of endogeneity caused by the spatial lag
>> estimator (as in SARAR model), does this GM procedure rely on 2SLS
>> estimates (which makes comparison between spatial 2SLS and spatial GMM
>> harder, as one is conditional on the other)?
>>
>
> 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<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<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.
>
>
>
>> So if these models are not directly comparable in terms of the
>> methodology,
>> is there any other way to make them? I may be confused at some point. I
>> appreciate any kind of help.
>>
>
> 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
>
>
>
>>
>> Thanks in advance
>>
>> Pelin
>>
>>
>>
>> On Mon, Jun 25, 2012 at 10:42 PM, Roger Bivand <Roger.Bivand@nhh.no>
>> wrote:
>>
>>  On Mon, 25 Jun 2012, Pelin Akçagün wrote:
>>>
>>>  Dear list users,
>>>
>>>>
>>>>
>>>>  From the package spdep, I understood that GMM-2SLS procedure can be
>>>>
>>>>> applied
>>>>>
>>>>>  to spatial cross-sectional regression models (without heteroscedastic
>>>> innovations) as in the following and I wonder if I get it correct:
>>>>
>>>>
>>> You seem to be in a hurry, try not to repeat questions, patience can
>>> help.
>>> The functions you mention have help pages, and you always have the
>>> function
>>> code if you are in doubt. You are expected to provide sample code for
>>> your
>>> question - did you consider that? You do not mention the sphet package,
>>> or
>>> its vignette and JSS article by Gianfranco Piras, perhaps you should look
>>> at those too?
>>>
>>> Roger
>>>
>>>
>>>  -  ?gstsls? (generalized spatial two stage least squares) command for
>>>> SARAR
>>>> (SAC) models
>>>>
>>>> - ?stsls? (spatial two stage least squares) command for spatial lag
>>>> models
>>>>
>>>> - ?GMerrorsar? command for spatial error model.
>>>>
>>>>
>>>> I wonder if each command -with some alterations- can be used
>>>> interchangeably. In particular, is there a way to directly estimate a GM
>>>> process for SARAR and spatial lag models? Or if not, do they use the
>>>> same
>>>> methodology with S2SLS (as in Kelejian and Prucha 1998, 1999)?
>>>>
>>>>
>>>> Thanks in advance,
>>>>
>>>> Best regards,
>>>>
>>>>
>>>> Pelin Akcagun
>>>>
>>>> Middle East Technical University
>>>>
>>>> Turkey
>>>>
>>>>       [[alternative HTML version deleted]]
>>>>
>>>>
>>>>
>>>>  --
>>> Roger Bivand
>>> Department of Economics, NHH Norwegian School of Economics,
>>> Helleveien 30, N-5045 Bergen, Norway.
>>> voice: +47 55 95 93 55; fax +47 55 95 95 43
>>> e-mail: Roger.Bivand@nhh.no
>>>
>>>
>>
> --
> Roger Bivand
> Department of Economics, NHH Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand@nhh.no
>

	[[alternative HTML version deleted]]

