Dynamic Copula Toolbox 3.0 (data subscripts problem)

I am trying to use MATLAB's Dynamic Copula Toolbox v 3.0. However, I keep getting errors regarding the data types and subscripts no matter what I try (already tried with cells and tables instead of datasets)
I already have my PITs (estimated prior). I have to following code so far:
aex = uniforms('AEX'); aex = aex(:,2);
mbi = uniforms('MBI10'); mbi = mbi(:,2);
uniforms is a containers.Map() object which has the daily log-returns and the dates as table class objects. To only keep the PIT values and get rid of the TimeStamp dates, I use `aex=aex(:,2)` and `mbi=mbi(:,2)`. AEX and MBI are two stock market indices
The following lines convert them into `dataset` arrays, since the documentation seems like it is using a `dataset`
data = dataset();
data(:,1) = table2dataset(aex);
data(:,2) = table2dataset(mbi);
(https://nl.mathworks.com/matlabcentral/fileexchange/29303-dynamic-copula-toolbox-3-0)
However, when I run `spec = modelspec(data)` as suggested in the documentation, and select Copula --> Clayton --> Static, the following error occurs:
spec = modelspec(data)
Error using dataset/subsrefParens (line 9)
Dataset array subscripts must be two-dimensional.
Error in dataset/subsref (line 69)`
[varargout{1:nargout}] = subsrefParens(a,s);
Error in corr (line 192)`
complexdata = ~(isreal(x) || all(imag(x(:))==0));
Error in modelspec (line 153)`
`xxx = corr(data,'type','Kendall');
The two PIT index vectors have the same length, while `nDims(data)` is `2692x2`
Any help is highly appreciated!

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Probability Distributions and Hypothesis Tests 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by