[R] Instrumental variable quantile estimation of spatial autoregressive models
Marie-Line Glaesener
Marie-Line.Glaesener at uni.lu
Wed May 4 17:30:05 CEST 2011
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>
More information about the R-help
mailing list