error correction model - general specification

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

error correction model - general specification

Gautier RENAULT

Hi R-users,

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:

·         Pt: index house prices in France from 1996:Q1 to 2009:Q3 (log dependent variable)

·         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.

Data are in “fr-demand-house.csv”.

The final aim is to estimate the long run relationship between houses prices (Pt) and the credit (Xt) in France :

Pt = α + ϕ Xt

I wish to estimate a general specification of the ECM as follows :

ΔPt=λ(Pt-1-α - ϕ Xt-1)+Σ(ΔXt-i)+Σ(ΔPt-i)

 

First, following the methodology presented in the book of B. Pfaff I bought, I already concluded that Pt and Xt are cointegrated  I(1) with ur.df (ADF test ) and ca.po (Phillips-Ouliaris Method) functions.

Second, how can I do :

1.       to choose optimal number of lag in this general specification for the two cointegrated variables Pt (ΔPt-i) and Xt (ΔXt-i)?

2.       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 ?

Can anyone help?

thanking you in advance,

 

Gautier RENAULT


_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

fr-house-demand.csv (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: error correction model - general specification

markleeds
Hi: I don't know the answers to your second and third questions but Schwert has a heuristic for choosing the correct number of
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
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.

if you do "Schwert lags vars" in google, i bet something will come up.







On Dec 23, 2009, Gautier RENAULT <[hidden email]> wrote:

Hi R-users,

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:

·         Pt: index house prices in France from 1996:Q1 to 2009:Q3 (log dependent variable)

·         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.

Data are in “fr-demand-house.csv”.

The final aim is to estimate the long run relationship between houses prices (Pt) and the credit (Xt) in France :

Pt = α + ϕ Xt

I wish to estimate a general specification of the ECM as follows :

 

ΔPt=λ(Pt-1-α - ϕ Xt-1)+Σ(ΔXt-i)+Σ(ΔPt-i)

 

First, following the methodology presented in the book of B. Pfaff I bought, I already concluded that Pt and Xt are cointegrated  I(1) with ur.df (ADF test ) and ca.po (Phillips-Ouliaris Method) functions.

Second, how can I do :

1.       to choose optimal number of lag in this general specification for the two cointegrated variables Pt (ΔPt-i) and Xt (ΔXt-i)?

2.       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 ?

Can anyone help?

thanking you in advance,

 

Gautier RENAULT




_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Reply | Threaded
Open this post in threaded view
|

Re: error correction model - general specification

Matthieu Stigler
Dear Renault

If you provide us with your data, you could then also give the code of the
analysis, would help us to help you :-)

answers below
2009/12/23 <[hidden email]>

> Hi: I don't know the answers to your second and third questions but Schwert
> has a heuristic for choosing the correct number of
> 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
> 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.
>
> if you do "Schwert lags vars" in google, i bet something will come up.
>
>
> On Dec 23, 2009, *Gautier RENAULT* <[hidden email]> wrote:
>
> Hi R-users,
>
> 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:
>
> ·         Pt: index house prices in France from 1996:Q1 to 2009:Q3 (log
> dependent variable)
>
> ·         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.
>
> Data are in “fr-demand-house.csv”.
>
> The final aim is to estimate the long run relationship between houses
> prices (Pt) and the credit (Xt) in France :
>
> Pt = α + ϕ Xt
>
> I wish to estimate a general specification of the ECM as follows :
>
>
>
> ΔPt=λ(Pt-1-α - ϕ Xt-1)+Σ(ΔXt-i)+Σ(ΔPt-i)
>
>
>
> Note that you are including an intercept in the ECM. It is not possible
with VAR(), but a (experimental) possibility is in package tsDyn:
library(tsDyn)
lineVar(data, lag=2, LRinclude="const",model="VECM")

But this works only with 2 step ols estimator (Engel Garnger) and Not
Johansen one.

Note actually that this is pretty tricky, the link between constant in the
LR and restricted VECM, Enders (applied time seriies eco) discusses it.

> First, following the methodology presented in the book of B. Pfaff I
> bought, I already concluded that Pt and Xt are cointegrated  I(1) with
> ur.df (ADF test ) and ca.po (Phillips-Ouliaris Method) functions.
>
> Second, how can I do :
>
> 1.       to choose optimal number of lag in this general specification for
> the two cointegrated variables Pt (ΔPt-i) and Xt (ΔXt-i)?
>
> Why don't you select the number of lags following  the AIC/BIC based on the
VAR? See then VARselect() from package vars

> 2.       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 ?
>
>
where? In the ECM or as normal regressor in the VECM? If in the ECM, again
you could set it in tsDyn as:
dummy<- c(rep(0, 20), 1, rep(0, 30))
lineVar(data, lag=2, LRinclude=dummy, model="VECM")

If in the VECM, use arg "exogen" in the VAR maybe...

Note that if you are testing for structural break within the LR, I had
implemented the Gregory Hansen test in R, but not ported further, bt I can
send you eventually rwa code if you want.

Hope this helps

> Can anyone help?
>
> thanking you in advance,
>
>
>
> Gautier RENAULT
>
> ------------------------------
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
        [[alternative HTML version deleted]]


_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Reply | Threaded
Open this post in threaded view
|

Re: error correction model - general specification

Arun.stat
In reply to this post by Gautier RENAULT
Lutkepohl discusses explicitly on how to choose optimum number of lags and how to incorporate seasonal dummy variables (like monthly, quarterly) with asymptotic distributions of corresponding estimated parameters.

Best,


Gautier RENAULT wrote
Hi R-users,

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:

·         Pt: index house prices in France from 1996:Q1 to 2009:Q3 (log
dependent variable)

·         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.

Data are in “fr-demand-house.csv”.

The final aim is to estimate the long run relationship between houses prices
(Pt) and the credit (Xt) in France :

Pt = α + ϕ Xt

I wish to estimate a general specification of the ECM as follows :

ΔPt=λ(Pt-1-α - ϕ Xt-1)+Σ(ΔXt-i)+Σ(ΔPt-i)



First, following the methodology presented in the book of B. Pfaff I bought,
I already concluded that Pt and Xt are cointegrated  I(1) with ur.df (ADF
test ) and ca.po (Phillips-Ouliaris Method) functions.

Second, how can I do :

1.       to choose optimal number of lag in this general specification for
the two cointegrated variables Pt (ΔPt-i) and Xt (ΔXt-i)?

2.       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 ?

Can anyone help?

thanking you in advance,



Gautier RENAULT

 
_______________________________________________
R-SIG-Finance@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.