[R-SIG-Finance] VECM estimation

mat matthieu.stigler at gmail.com
Sun Dec 19 23:40:36 CET 2010


Le 19. 12. 10 23:35, Megh Dal a écrit :
> Thanks Matthieu the VECM() function is quite okay on what I need however I also need to have structural analysis (atleast B-model) of my fitted model. It seems that tsDyn package does not have any option for that, whereas vars package has with SVEC() function.

if you need structural analysis, then vars is definitely more appropriate
> But problem I am facing is again, it needs specific object type as: "Object of class ‘ca.jo’; generated by ca.jo() contained in urca".
>
did you check the help file of SVEC? There is a "r" argument:

  r: Integer, the cointegration rank of x.

Is this not what you need? If not, please indicate more precisely (i.e. 
also with code) where the problem is

Hope this helps

Mat

> Is there any option to use object returned from VECM() in SVEC()? Or can you suggest anything else?
>
> Thanks,
>
> --- On Mon, 12/20/10, mat<matthieu.stigler at gmail.com>  wrote:
>
>> From: mat<matthieu.stigler at gmail.com>
>> Subject: Re: [R-SIG-Finance] VECM estimation
>> To: "Megh Dal"<megh700004 at yahoo.com>
>> Cc: "r-sig-finance at stat.math.ethz.ch"<r-sig-finance at stat.math.ethz.ch>
>> Date: Monday, December 20, 2010, 3:47 AM
>> Le 19. 12. 10 21:38, Megh Dal a
>> écrit :
>>> Hi, I wanted to estimate a VEC model using vars
>> package and gone through it's ca.jo() function. However I
>> could not find any option to have following inputs:
>> Starting with:
>>
>> library(vars)
>> data(Canada)
>> ve<-ca.jo(Canada, spec="transitory")
>>> 1. Intercept and linear trend in cointegration
>> equation (either one is available but not both option)
>> indeed I think it is not possible...
>>> 2. I want to explicitly specify the rank. It seems
>> ca.jo() chooses rank through testing. However what if I want
>> to put my own rank disregarding any statistical test?
>> cajorls(ve, r=2)
>>> 3. I also want to get all estimated coefficients
>> also obtained with cajorls()
>>
>> Another possibility would have been to use package tsDyn
>> (but less
>> features than vars):
>>
>> ve2<-VECM(Canada, lag=1, r=2, estim="ML")
>>
>> summary(ve2)
>>> I have tried following, however getting error:
>>>
>>>
>>>> data(denmark)
>>>> sjd<- as.matrix(denmark[, c("LRM", "LRY",
>> "IBO", "IDE")])
>>>> ca.jo(sjd, ecdet = c("const", "trend"),
>> type="eigen", K=2, spec="transitory")
>>> Error in match.arg(ecdet) : 'arg' must be of length 1
>>>
>>> I would be grateful I somebody points me how to
>> achieve that.
>>> Thanks,
>>>
>>> _______________________________________________
>>> R-SIG-Finance at r-project.org
>> 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.
>>
>>
>
>



More information about the R-SIG-Finance mailing list