Hi Paul,

Just a note to add to what Roger and Juan Tomas have said. The R code file
related to Anselin, Amaral and Arribas-Bel (2012), which you can download
from here <https://geodacenter.asu.edu/drupal_files/Code.zip> (along with
Python and Stata code) is simply a markdown file, that is, a plain text
file. If you open it in  your text editor of preference, you can read
along. That is to say, you don't really need knittr. In particular, the R
code is wrapped between "```{r}" and "```", so you can copy from there and
paste into the R interpreter and will work.

hih, best,

]d[


On Tue, May 7, 2013 at 12:00 PM, <r-sig-geo-request@r-project.org> wrote:

> Send R-sig-Geo mailing list submissions to
>         r-sig-geo@r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> or, via email, send a message with subject or body 'help' to
>         r-sig-geo-request@r-project.org
>
> You can reach the person managing the list at
>         r-sig-geo-owner@r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-sig-Geo digest..."
>
>
> Today's Topics:
>
>    3. Endogenous explanatory variables in sphet (Feichtinger, Paul)
>
>    5. Re: Endogenous explanatory variables in sphet (Roger Bivand)
>    6. Re: Endogenous explanatory variables in sphet
>       (Juan Tomas Sayago Gomez)
>
> ----------------------------------------------------------------------
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 6 May 2013 17:58:26 +0000
> From: "Feichtinger, Paul" <paul.feichtinger@tum.de>
> To: "r-sig-geo@r-project.org" <r-sig-geo@r-project.org>
> Subject: [R-sig-Geo] Endogenous explanatory variables in sphet
> Message-ID:
>         <
> CCD7DE7E72D4B341896DB1CE20AEB805373F0BAF@BADWLRZ-SWMBX11.ads.mwn.de>
> Content-Type: text/plain
>
> Dear list members,
>
> I was wondering if someone could help me out. Estimating a general spatial
> model (gstslshet) our model is likely to suffer from endogeneity not only
> introduced by the spatial lag but also from other explanatory variables. Is
> there any possibility to explicitly account for this endogeneity (by using
> specific instruments)? Is it covered/dealt with in some kind? Obviously I
> do not understand equation 4 in Piras (2010).
> I read Anselin, Amaral and Arribas-Bel (2012) where they compare different
> GMM implementations among others also with an endogenous explanatory
> variable, but cannot reproduce the results in R sphet (problem is knitr,
> sweave,... I never use that), which is the only spatial econometrics
> software I use as I am a beginner. I would be really glad I someone could
> explain me this issue.
>
> Best regards,
>
> Paul
> ---
> Technische Universität München - TUM
> Paul Feichtinger
> Lehrstuhl für Volkswirtschaftslehre, Umweltökonomie und Agrarpolitik
>
> Alte Akademie 14
> 85354 Freising
> Tel: +49.8161.71.3574
> Fax: +49.8161.71.3408
> e-mail: Paul.Feichtinger@tum.de
>
>
>         [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
>
>
> ------------------------------
>
> Message: 5
> Date: Mon, 6 May 2013 20:14:20 +0200
> From: Roger Bivand <Roger.Bivand@nhh.no>
> To: "Feichtinger, Paul" <paul.feichtinger@tum.de>
> Cc: "r-sig-geo@r-project.org" <r-sig-geo@r-project.org>
> Subject: Re: [R-sig-Geo] Endogenous explanatory variables in sphet
> Message-ID: <alpine.LRH.2.03.1305062004380.17931@reclus.nhh.no>
> Content-Type: text/plain; format=flowed; charset="US-ASCII"
>
> On Mon, 6 May 2013, Feichtinger, Paul wrote:
>
> > Dear list members,
> >
> > I was wondering if someone could help me out. Estimating a general
> > spatial model (gstslshet) our model is likely to suffer from endogeneity
> > not only introduced by the spatial lag but also from other explanatory
> > variables. Is there any possibility to explicitly account for this
> > endogeneity (by using specific instruments)? Is it covered/dealt with in
> > some kind? Obviously I do not understand equation 4 in Piras (2010). I
>
> I suggest that you install the development version of sphet from R-forge:
>
> install.packages("sphet", repos="http://R-Forge.R-project.org")
>
> and look for spreg(), which is a wrapper function for the model-fitting
> functions. You should look for the endog= and instruments= arguments,
> where:
>
> spreg(formula = CRIME ~ HOVAL, data = columbus, listw = listw,
>      endog = "INC", instruments = "DISCBD")
>
> is an example of usage.
>
> Hope this helps,
>
> Roger
>
> > read Anselin, Amaral and Arribas-Bel (2012) where they compare different
> > GMM implementations among others also with an endogenous explanatory
> > variable, but cannot reproduce the results in R sphet (problem is knitr,
> > sweave,... I never use that), which is the only spatial econometrics
> > software I use as I am a beginner. I would be really glad I someone
> > could explain me this issue.
> >
> > Best regards,
> >
> > Paul
> > ---
> > Technische Universit?t M?nchen - TUM
> > Paul Feichtinger
> > Lehrstuhl f?r Volkswirtschaftslehre, Umwelt?konomie und Agrarpolitik
> >
> > Alte Akademie 14
> > 85354 Freising
> > Tel: +49.8161.71.3574
> > Fax: +49.8161.71.3408
> > e-mail: Paul.Feichtinger@tum.de
> >
> >
> >       [[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
>
>
>
> ------------------------------
>
> Message: 6
> Date: Mon, 6 May 2013 14:26:30 -0400
> From: Juan Tomas Sayago Gomez <juantomas.sayago@gmail.com>
> To: Roger.Bivand@nhh.no
> Cc: "Feichtinger, Paul" <paul.feichtinger@tum.de>,
>         "r-sig-geo@r-project.org" <r-sig-geo@r-project.org>
> Subject: Re: [R-sig-Geo] Endogenous explanatory variables in sphet
> Message-ID:
>         <CAEOXpNB2ft2bjQT=OUSCTX=
> 0GK3n0xCO+U2nH_TCE2pxasWvRQ@mail.gmail.com>
> Content-Type: text/plain
>
> Dear Paul,
> The papers referenced in the command help explain the use of the spatial
> variables as instruments. The stsls is explained in the Kelejian and Prucha
> 1998.
>
> Arraiz, I. and Drukker, M.D. and Kelejian, H.H. and Prucha, I.R. (2007) A
> spatial Cliff-Ord-type Model with Heteroskedastic Innovations: Small and
> Large Sample Results, Department of Economics, University of Maryland'
>
> Kelejian, H.H. and Prucha, I.R. (2007) Specification and Estimation of
> Spatial Autoregressive Models with Autoregressive and Heteroskedastic
> Disturbances, Journal of Econometrics, forthcoming.
>
> Kelejian, H.H. and Prucha, I.R. (1999) A Generalized Moments Estimator for
> the Autoregressive Parameter in a Spatial Model, International Economic
> Review, 40, pages 509--533.
>
> Kelejian, H.H. and Prucha, I.R. (1998) A Generalized Spatial Two Stage
> Least Square Procedure for Estimating a Spatial Autoregressive Model with
> Autoregressive Disturbances, Journal of Real Estate Finance and Economics,
> 17, pages 99--121.
>
>
>  You can also check consistency in the paper
>
> On Two-step Estimation of a Spatial Autoregressive Model
> with Autoregressive Disturbances and Endogenous Regressors
> David M. DrukkerPeter Egger, and Ingmar R. Prucha
> http://www.be.wvu.edu/econ_seminar/documents/11-12/Prucha1.pdf
>
>
> On the GMM models
> http://econweb.umd.edu/~prucha/papers/WP_IRP_HRS_2012.pdf
>
>
> Hope this helps.
>
> Juan
>
>
-- 
======================================
Daniel Arribas-Bel, PhD.
Url: darribas.org
Mail: darribas@feweb.vu.nl

Department of Spatial Economics,
Faculty of Economics and Business Administration
VU University, Amsterdam (Netherlands)
======================================

	[[alternative HTML version deleted]]

