Marie-Line Glaesener
2011-May-04 15:30 UTC
[R] Instrumental variable quantile estimation of spatial autoregressive models
Dear all,
I would like to implement a spatial quantile regression using instrumental
variable estimation (according to Su and Yang (2007), Instrumental variable
quantile estimation of spatial autoregressive models, SMU economics &
statistis working paper series, 2007, 05-2007, p.35 ).
I am applying the hedonic pricing method on land transactions in Luxembourg. My
original data set contains 4335 observations.
I'm quite new to R and would like to ask if someone has implemented the
method proposed by Su and Yang in R or if anyone could give me a hint on the
different codes and steps?
Please find attached a small sample of my data and matrix.
R codes:
library(foreign)
library(lmtest)
library(spdep)
library(quantreg)
data<-read.table("DataSample.txt",header=TRUE, sep="")
attach(data)
matrix<-read.gwt2nb("matrixsample.gwt" ,region.id=no_Trans)
matrix.listw<-nb2listw(matrix)
OLS model
OLS<-lm(lnprice~surface+d2007+LUX+tsect_ci, data=data)
summary(OLS)
SAR model
SAR<-lagsarlm(lnprice~surface+d2007+LUX+tsect_ci, data=data, listw =
matrix.listw)
summary(SAR)
I hope that this information is sufficient and will help you to help me :)
Many thanks in advance,
Marie-Line Glaesener
PhD student
Unit? de Recherche IPSE (Identit?s. Politiques, Soci?t?s, Espaces)
Laboratoire de G?ographie et Am?nagement du Territoire
UNIVERSIT? DU LUXEMBOURG
CAMPUS WALFERDANGE
Route de Diekirch / BP 2
L-7201 Walferdange
Luxembourg
www.geo.ipse.uni.lu<http://www.geo.ipse.uni.lu/>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DataSample.txt
URL:
<https://stat.ethz.ch/pipermail/r-help/attachments/20110504/4153ba98/attachment.txt>
Roger Bivand
2011-May-05 19:01 UTC
[R] Instrumental variable quantile estimation of spatial autoregressive models
This is a very detailed question, and possibly ought to have been posted on R-sig-geo. Please re-post there, and see if anyone steps forward. As far as I am aware, no implementation exists. I suggest you also refer to Kostov (2009) in Spatial Economic Analysis volume 4. Roger Marie-Line Glaesener wrote:> > Dear all, > > I would like to implement a spatial quantile regression using instrumental > variable estimation (according to Su and Yang (2007), Instrumental > variable quantile estimation of spatial autoregressive models, SMU > economics & statistis working paper series, 2007, 05-2007, p.35 ). > > I am applying the hedonic pricing method on land transactions in > Luxembourg. My original data set contains 4335 observations. > I'm quite new to R and would like to ask if someone has implemented the > method proposed by Su and Yang in R or if anyone could give me a hint on > the different codes and steps? > Please find attached a small sample of my data and matrix. > R codes: > > library(foreign) > library(lmtest) > library(spdep) > library(quantreg) > > data<-read.table("DataSample.txt",header=TRUE, sep="") > attach(data) > > matrix<-read.gwt2nb("matrixsample.gwt" ,region.id=no_Trans) > matrix.listw<-nb2listw(matrix) > > OLS model > OLS<-lm(lnprice~surface+d2007+LUX+tsect_ci, data=data) > summary(OLS) > > SAR model > SAR<-lagsarlm(lnprice~surface+d2007+LUX+tsect_ci, data=data, listw > matrix.listw) > summary(SAR) > > I hope that this information is sufficient and will help you to help me :) > > Many thanks in advance, > > Marie-Line Glaesener > > PhD student > Unit? de Recherche IPSE (Identit?s. Politiques, Soci?t?s, Espaces) > Laboratoire de G?ographie et Am?nagement du Territoire > > UNIVERSIT? DU LUXEMBOURG > CAMPUS WALFERDANGE > Route de Diekirch / BP 2 > L-7201 Walferdange > Luxembourg > www.geo.ipse.uni.lu<http://www.geo.ipse.uni.lu/> > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >----- Roger Bivand Economic Geography Section Department of Economics Norwegian School of Economics and Business Administration Helleveien 30 N-5045 Bergen, Norway -- View this message in context: http://r.789695.n4.nabble.com/Instrumental-variable-quantile-estimation-of-spatial-autoregressive-models-tp3496637p3499190.html Sent from the R help mailing list archive at Nabble.com.