<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR-CH" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">Dear all,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">I would like to implement a spatial quantile regression using instrumental variable estimation (according to Su and Yang (2007),<i> Instrumental variable quantile estimation of
 spatial autoregressive models</i>, SMU economics & statistis working paper series, 2007, 05-2007, p.35</span><span lang="EN-GB" style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH"> ).
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">I am applying the hedonic pricing method on
</span><span lang="EN-GB" style="font-family:"Arial","sans-serif"">land transactions in Luxembourg.  My original data set contains 4335 observations.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">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?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">Please find attached a small sample of my data and matrix.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">R codes:
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">library(foreign)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">library(lmtest)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">library(spdep)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">library(quantreg)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">data<-read.table("DataSample.txt",header=TRUE, sep="")<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">attach(data)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">matrix<-read.gwt2nb("matrixsample.gwt" ,region.id=no_Trans)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">matrix.listw<-nb2listw(matrix)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">OLS model<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">OLS<-lm(lnprice~surface+d2007+LUX+tsect_ci, data=data)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">summary(OLS)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">SAR model<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">SAR<-lagsarlm(lnprice~surface+d2007+LUX+tsect_ci, data=data, listw = matrix.listw)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">summary(SAR)
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">I hope that this information is sufficient and will help you to help me
</span><span lang="EN-GB" style="font-family:Wingdings">J</span><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">Many thanks in advance,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif"">Marie-Line Glaesener<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">PhD student<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">Unité de Recherche IPSE (Identités. Politiques, Sociétés, Espaces)
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">Laboratoire de Géographie et Aménagement du Territoire<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">UNIVERSITÉ DU LUXEMBOURG<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">CAMPUS WALFERDANGE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">Route de Diekirch / BP 2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">L-7201 Walferdange<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH">Luxembourg<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><a href="http://www.geo.ipse.uni.lu/"><span style="mso-fareast-language:FR-CH">www.geo.ipse.uni.lu</span></a></span><span style="font-family:"Arial","sans-serif";mso-fareast-language:FR-CH"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
</div>
</body>
</html>