Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coefA for ca.jo(): error when r=2, Error in alpha %*% t(beta) %*% C: non-conformable arguments #28

Open
MatthieuStigler opened this issue Dec 5, 2020 · 0 comments
Labels

Comments

@MatthieuStigler
Copy link
Owner

MatthieuStigler commented Dec 5, 2020

See:

library(tsDyn)
#> Registered S3 method overwritten by 'quantmod':
#>   method            from
#>   as.zoo.data.frame zoo
library(vars)
#> Loading required package: MASS
#> Loading required package: strucchange
#> Loading required package: zoo
#> 
#> Attaching package: 'zoo'
#> The following objects are masked from 'package:base':
#> 
#>     as.Date, as.Date.numeric
#> Loading required package: sandwich
#> Loading required package: urca
#> Loading required package: lmtest
data(Canada)
coefA(ca.jo(Canada, K=2, ecdet="const", spec="transitory"), r=2)
#> Error in alpha %*% t(beta) %*% C: non-conformable arguments

coefA(VECM(Canada, lag=1, include="none", estim="ML", LRinclude="const", r=2))
#>                      ECT1         ECT2
#> Equation e     0.16253574  0.025823604
#> Equation prod  0.24890771  0.038567524
#> Equation rw   -0.06908972 -0.003275944
#> Equation U    -0.13032231 -0.018812818

coefB(ca.jo(Canada, K=2, ecdet="const", spec="transitory"), r=2)
#>                   [,1]        [,2]
#> e.l1      1.000000e+00    0.000000
#> prod.l1   2.775558e-17    1.000000
#> rw.l1     1.324539e-01   -3.222172
#> U.l1      6.343565e+00  -24.116568
#> constant -1.088346e+03 1411.866972
coefB(VECM(Canada, lag=1, include="none", estim="ML", LRinclude="const", r=2))
#>                  r1          r2
#> e         1.0000000    0.000000
#> prod      0.0000000    1.000000
#> rw        0.1324539   -3.222172
#> U         6.3435652  -24.116568
#> const -1088.3457302 1411.866970

Created on 2020-12-05 by the reprex package (v0.3.0)

@MatthieuStigler MatthieuStigler changed the title coefA for ca.jo(): error when r=2 coefA for ca.jo(): error when r=2, Error in alpha %*% t(beta) %*% C: non-conformable arguments Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant