Matlab 2013中的Bootstrap计算协方差矩阵和均值

时间:2013-12-23 15:05:48

标签: matlab covariance statistics-bootstrap

以下是代码和错误消息。我正在尝试计算bootstraped协方差矩阵和均值。知道为什么我的尺寸不一致吗?

此致

RawReturn = csvread('Raw return data.csv');
bootstat = bootstrp(1000, @(x)[mean(x), cov(x)], RawReturn);
-------------------------------------------------------------

Error using horzcat
Dimensions of matrices being concatenated are
not consistent.

Error in @(x)[mean(x),cov(x)]


Error in bootstrp (line 167)
 bootstat = feval(bootfun,bootargs{:});

Error in Efficient_frontier (line 2)
bootstat = bootstrp(1000, @(x)[mean(x), cov(x)],
RawReturn);

Caused by:
Unable to evaluate BOOTFUN with the supplied
arguments.

0 个答案:

没有答案