MatthieuStigler / tsDyn

tsDyn
tsdyn.googlecode.com
33 stars 20 forks source link

Wrong rank for irf function #11

Closed kilasuelika closed 3 years ago

kilasuelika commented 5 years ago

When I use

full_irf=irf(full_varmodel, impulse = c("Reddit_Weighted","Reddit_Weighted_Log",
                               "Reddit_Equal","FT_Equal"), 
    response = "ReturnDaily", boot =
      TRUE)

It reports:

Error in vec2var(vec, r = x$r) : 
The cointegration rank 'r' must be in the interval [1:4].

However if replace boot=TRUE to boot=FALSE. Then it's ok. I think the problem is r=x$r and it should be r=x$k. But I can't find this line is in which file.

MatthieuStigler commented 5 years ago

Hi

Mmh, code r=x$r seems correct if one wants to retrieve the rank... What are the values of k and r for your model?

Can you please create a reproducible example (ideally using built-in dataset?) with package reprex so that I can investigate it?

Thanks

MatthieuStigler commented 3 years ago

Closing this issue as inactive, please re-open if you have a reproducible example,