Hi: I don't know the answers to your second and third questions but Schwert has a heuristic for choosing the correct number of<br />lags in the ECM. It's in Eric Zivot's S+ Finmetrics book if you have that. There is no "correct way" really and there are probably other ways but I've seen that one used in the literature. If you don't have the book and can't find it on the internet, let<br />me know and I'll look it up in Eric's book assuming it's in my apt and not in other places that it might be.<br /><br />if you do "Schwert lags vars" in google, i bet something will come up.<br /><br /><br /><br /><br /><br /><br /><br /><p>On Dec 23, 2009, <strong>Gautier RENAULT</strong> <renault.gautier@gmail.com> wrote: </p><div class="replyBody"><blockquote style="border-left: 2px solid #267fdb; margin: 0pt 0pt 0pt 1.8ex; padding-left: 1ex"> <p class="MsoNormal"><span>Hi R-users,</span></p> <p class="MsoNormal"><span>I try to deal with cointegration in R and estimate an Error Correction Model (ECM) in a bivariate case in which I consider two variables:</span></p> <p style="text-indent: -18pt" class="MsoListParagraphCxSpFirst"><span style="font-family: Symbol"><span>·<span> </span></span></span><span>Pt: index house prices in France from 1996:Q1 to 2009:Q3 (log dependent variable)</span></p> <p style="text-indent: -18pt" class="MsoListParagraphCxSpLast"><span style="font-family: Symbol"><span>·<span> </span></span></span><span>Xt: amount that households can borrow (log explanatory variable). Xt captures the role of credit, income and interest rate as drivers of the french housing demand.</span></p> <p class="MsoNormal"><span>Data are in “fr-demand-house.csv”.</span></p> <p class="MsoNormal"><span>The final aim is to estimate the long run relationship between houses prices (Pt) and the credit (Xt) in France :</span></p> <p class="MsoNormal"><span>Pt = </span><span>α</span><span> + </span><span>ϕ</span><span> Xt </span></p> <p class="MsoNormal"><span>I wish to estimate a general specification of the ECM as follows :</span></p> <p class="MsoNormal"> </p><p class="MsoNormal"><span>Δ</span><span>Pt=</span><span>λ</span><span>(Pt-1-</span><span>α</span><span> - </span><span>ϕ</span><span> Xt-1)+</span><span style="font-size: 11pt; line-height: 115%">Σ</span><span>(</span><span>Δ</span><span>Xt-i)</span><span>+</span><span style="font-size: 11pt; line-height: 115%">Σ</span><span>(</span><span>ΔPt-i)</span></p> <p class="MsoNormal"><span> </span></p> <p class="MsoNormal"><span>First, following the methodology presented in the book of B. Pfaff I bought, I already concluded that Pt and Xt are cointegrated <span> </span>I(1) with ur.df (ADF test ) and ca.po (Phillips-Ouliaris Method) functions.</span></p> <p class="MsoNormal"><span>Second, how can I do :</span></p> <p style="text-indent: -18pt" class="MsoListParagraphCxSpFirst"><span><span>1.<span> </span></span></span><span>to choose optimal number of lag in this general specification for the two cointegrated variables Pt </span><span>(ΔPt-i) </span><span>and Xt (</span><span>Δ</span><span>Xt-i)</span><span>?</span></p> <p style="text-indent: -18pt" class="MsoListParagraphCxSpLast"><span><span>2.<span> </span></span></span><span>to add a dummy variable for the first quarter of 2009 (dumQ1-2009) to test the collapse of houses prices in France at the beginning of 2009 ?</span></p> <p class="MsoNormal"><span>Can anyone help?</span></p> <p class="MsoNormal"><span>thanking you in advance,</span></p> <p class="MsoNormal"><span> </span></p> <p class="MsoNormal"><span>Gautier RENAULT</span></p> <br /><hr /><br />_______________________________________________<br />R-SIG-Finance@stat.math.ethz.ch mailing list<br />https://stat.ethz.ch/mailman/listinfo/r-sig-finance<br />-- Subscriber-posting only.<br />-- If you want to post, subscribe first.</blockquote></div>