[R-SIG-Finance] FW: VECM problem with exogenous components

Pfaff, Bernhard Dr. Bernhard_Pfaff at fra.invesco.com
Thu Apr 1 12:38:57 CEST 2010


Dear Gautier,

you can apply the summary-method to the list element rlm returned by cajorls(), which is of class c("mlm", "lm"). If you have two exogenous variables and only one endogenous variable, you can estimate your model in two steps. First, the ci-relation(s), next a single equation as casted in ECM form. By definition, exogenous variables do not appear on the left-hand side.

HTH,
Bernhard   

 |>  -----Original Message-----
 |>  From: Gautier RENAULT [mailto:renault.gautier at gmail.com] 
 |>  Sent: Wednesday, March 31, 2010 9:57 PM
 |>  To: Pfaff, Bernhard Dr.
 |>  Cc: Matthieu Stigler; r-sig-finance at stat.math.ethz.ch
 |>  Subject: Re: [R-SIG-Finance] FW: VECM problem with 
 |>  exogenous components
 |>  
 |>  Yes, beta matrix is same in R and E-views.
 |>  
 |>  May I ask you what code R do you advice (1) to carry out 
 |>  the estimation of a partial vecm in which one ore more 
 |>  components are exogenous and (2) to provide t-stats, probs ?
 |>  
 |>  In my case, I have three variables (y1, y2, y3). two of 
 |>  them are clearly exogeneous (y2, y3). I used alrtest( ) 
 |>  
 |>  y.mat<-data.frame(y1,y2,y3)
 |>  vecm<-ca.jo(y.mat, type="trace",  ecdet= "const", 
 |>  K=2,spec="transitory")
 |>  
 |>  A<-matrix(c(1,0,0), nrow=3, ncol=1)
 |>  vecm.restriction<-alrtest(vecm, A, r=1)
 |>  
 |>  the result of the test for binding restrictions are :
 |>  chi-square : 1.55
 |>  probs : 0.45
 |>  
 |>  thanks for your help,
 |>  
 |>  Gautier
 |>  
 |>  
 |>  2010/3/31 Pfaff, Bernhard Dr. <Bernhard_Pfaff at fra.invesco.com>
 |>  
 |>  
 |>  	Hello Gautier,
 |>  	
 |>  	I am not familiar with the EViews implementation and 
 |>  hence cannot comment on why the results differ. Is the 
 |>  \beta matrix the same, i.e. the normalization?
 |>  	
 |>  	Best,
 |>  	Bernhard
 |>  	
 |>  
 |>  	 |>  -----Original Message-----
 |>  	 |>  From: renault gautier [mailto:renault.gautier at gmail.com]
 |>  	 |>  Sent: Wednesday, March 31, 2010 12:34 PM
 |>  	 |>  To: Pfaff, Bernhard Dr.
 |>  	 |>  Cc: Matthieu Stigler; r-sig-finance at stat.math.ethz.ch
 |>  	 |>  Subject: Re: [R-SIG-Finance] FW: VECM problem with
 |>  	 |>  exogenous components
 |>  	 |>
 |>  	 |>  Hello Bernhard,
 |>  	 |>
 |>  	 |>  I bought and red your book few month ago. I really
 |>  	 |>  appreciated it. It is
 |>  	 |>  useful to cope with econometrics in R.
 |>  	 |>
 |>  	 |>  Since alrtest()  returns a cajo.test object, can I take
 |>  	 |>  the result of
 |>  	 |>  this function as an argument in cajorls function to solve
 |>  	 |>  my problem
 |>  	 |>  with urca package? According to R documentation, cajorls()
 |>  	 |>  can take
 |>  	 |>  ca.jo or cajo.test.
 |>  	 |>
 |>  	 |>  I dit it to try and obtain all values (estimators, t
 |>  	 |>  stats, associated
 |>  	 |>  probs, standard errors) except for the 
 |>  cointegration equation by
 |>  	 |>  applying summary method :
 |>  	 |>  these values seems to be right for lagged differences (I
 |>  	 |>  compare with
 |>  	 |>  results with E-view)
 |>  	 |>  but the values associated to error correction terms seems
 |>  	 |>  to be false...
 |>  	 |>
 |>  	 |>  How is it possible ?
 |>  	 |>
 |>  	 |>  Gautier
 |>  	 |>
 |>  	 |>
 |>  	 |>
 |>  	 |>  Le 31/03/2010 11:53, Pfaff, Bernhard Dr. a écrit :
 |>  	 |>  > Hello Mat,
 |>  	 |>  >
 |>  	 |>  > your are right about your asertion. cajorls() suffices
 |>  	 |>  for non-restricted models and hence a transformation to
 |>  	 |>  level-VAR is not necessary.
 |>  	 |>  >
 |>  	 |>  > Best,
 |>  	 |>  > Bernhard
 |>  	 |>  >
 |>  	 |>  >   |>   -----Original Message-----
 |>  	 |>  >   |>   From: Matthieu Stigler 
 |>  [mailto:matthieu.stigler at gmail.com]
 |>  	 |>  >   |>   Sent: Wednesday, March 31, 2010 11:46 AM
 |>  	 |>  >   |>   To: r-sig-finance at stat.math.ethz.ch
 |>  	 |>  >   |>   Cc: Pfaff, Bernhard Dr.; renault.gautier at gmail.com
 |>  	 |>  >   |>   Subject: Re: [R-SIG-Finance] FW: VECM problem with
 |>  	 |>  >   |>   exogenous components
 |>  	 |>  >   |>
 |>  	 |>  >   |>   Hi
 |>  	 |>  >   |>
 |>  	 |>  >   |>   but how can I get standard errors, t values,
 |>  	 |>  >   |>    |>   associated probs for :
 |>  	 |>  >   |>    |>    |>   the cointegration equation ?
 |>  	 |>  >   |>    |>    |>   the estimated value of the error
 |>  	 |>  correction term ?
 |>  	 |>  >   |>    |>    |>   the lagged differences ?
 |>  	 |>  >   |>
 |>  	 |>  >   |>   Ok 1 is not available, but I thought 2 
 |>  and 3 would be
 |>  	 |>  >   |>   available through
 |>  	 |>  >   |>   cajorls(), unless one estimates a restricted
 |>  	 |>  model, right?
 |>  	 |>  >   |>
 |>  	 |>  >   |>   Thanks for clarifying this point!
 |>  	 |>  >   |>
 |>  	 |>  >   |>   Matthieu
 |>  	 |>  >   |>
 |>  	 |>  >   |>   Pfaff, Bernhard Dr. a écrit :
 |>  	 |>  >   |>   >  Dear Gautier,
 |>  	 |>  >   |>   >
 |>  	 |>  >   |>   >  standard errors, t-values and marginal
 |>  	 |>  signficnance levels
 |>  	 |>  >   |>   >  are not implmenented for a VECM in the 
 |>  package urca.
 |>  	 |>  >   |>   >  However, you can transform your VECM 
 |>  into its level-VAR
 |>  	 |>  >   |>   >  form (see vec2var() in package vars) 
 |>  and can obtain the
 |>  	 |>  >   |>   >  desired numbers by applying the summary method.
 |>  	 |>  >   |>   >
 |>  	 |>  >   |>   >  Best,
 |>  	 |>  >   |>   >  Bernhard
 |>  	 |>  >   |>   >
 |>  	 |>  >   |>   >
 |>  	 |>  >   |>   >   |>
 |>  	 |>  >   |>   >   |>    |>   -----Original Message-----
 |>  	 |>  >   |>   >   |>    |>   From:
 |>  	 |>  r-sig-finance-bounces at stat.math.ethz.ch
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   
 |>  [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf
 |>  	 |>  >   |>   >   |>    |>   Of Gautier RENAULT
 |>  	 |>  >   |>   >   |>    |>   Sent: Wednesday, March 31, 
 |>  2010 10:58 AM
 |>  	 |>  >   |>   >   |>    |>   To: r-sig-finance at stat.math.ethz.ch
 |>  	 |>  >   |>   >   |>    |>   Subject: [R-SIG-Finance] VECM
 |>  	 |>  problem with exogenous
 |>  	 |>  >   |>   >   |>   components
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   Dear all,
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   I deal with a econometrics 
 |>  problem in R.
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   My final goal is to estimate a
 |>  	 |>  vecm (three components)
 |>  	 |>  >   |>   >   |>    |>   imposing combined
 |>  	 |>  >   |>   >   |>    |>   restrictions on two components in
 |>  	 |>  alpha matrix.
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   I have no problem to :
 |>  	 |>  >   |>   >   |>    |>   solve the problem using ca.jo()
 |>  	 |>  and cajorls()
 |>  	 |>  >   |>   when I treat
 |>  	 |>  >   |>   >   |>    |>   all components as
 |>  	 |>  >   |>   >   |>    |>   endogenous
 |>  	 |>  >   |>   >   |>    |>   test exogeneity of one or 
 |>  more components
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   but how can I get standard errors,
 |>  	 |>  t values,
 |>  	 |>  >   |>   >   |>   associated probs for :
 |>  	 |>  >   |>   >   |>    |>   the cointegration equation ?
 |>  	 |>  >   |>   >   |>    |>   the estimated value of the error
 |>  	 |>  correction term ?
 |>  	 |>  >   |>   >   |>    |>   the lagged differences ?
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   This is my R code :
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   y.mat<-data.frame(y1,y2,y3)
 |>  	 |>  >   |>   >   |>    |>   vecm<-ca.jo(y.mat, type="trace",
 |>  	 |>  ecdet= "const", K=2,
 |>  	 |>  >   |>   >   |>    |>   spec="transitory")
 |>  	 |>  >   |>   >   |>    |>   vecm.result<-cajorls(vecm, r=1)
 |>  	 |>  >   |>   >   |>    |>   summary(vecm.result$rlm)
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   # testing weak exogeneity
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   A<-matrix(c(1,0,0), 
 |>  nrow=3, ncol=1)       #
 |>  	 |>  >   |>   restriction
 |>  	 |>  >   |>   >   |>    |>   matrix (y2, y3
 |>  	 |>  >   |>   >   |>    |>   :treated as exogenous)
 |>  	 |>  >   |>   >   |>    |>   
 |>  vecm.restriction<-alrtest(vecm, A, r=1)
 |>  	 |>  >   |>   >   |>    |>   summary(vecm.restriction)
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   Could someone help ?
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>   Gautier
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>      [[alternative HTML 
 |>  version deleted]]
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  _______________________________________________
 |>  	 |>  >   |>   >   |>    |>   R-SIG-Finance at 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.
 |>  	 |>  >   |>   >   |>    |>   -- Also note that this is not the
 |>  	 |>  r-help list where
 |>  	 |>  >   |>   >   |>    |>   general R questions should go.
 |>  	 |>  >   |>   >   |>    |>
 |>  	 |>  >   |>   >   |>
 |>  	 |>  >   |>   >
 |>  	 |>  
 |>  *****************************************************************
 |>  	 |>  >   |>   >  Confidentiality Note: The information 
 |>  contained in this
 |>  	 |>  >   |>   ...{{dropped:10}}
 |>  	 |>  >   |>   >
 |>  	 |>  >   |>   >  _______________________________________________
 |>  	 |>  >   |>   >  R-SIG-Finance at 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.
 |>  	 |>  >   |>   >  -- Also note that this is not the 
 |>  r-help list where
 |>  	 |>  >   |>   general R questions should go.
 |>  	 |>  >   |>   >
 |>  	 |>  >   |>
 |>  	 |>  >   |>
 |>  	 |>  >
 |>  	 |>
 |>  	 |>
 |>  	
 |>  
 |>  
 |>  
*****************************************************************
Confidentiality Note: The information contained in this ...{{dropped:10}}



More information about the R-SIG-Finance mailing list