Most likely you have a function named corr on your path other than the one in the Statistics Toolbox. Type "which corr -all" to find and remove it.
partial correlation
9 次查看(过去 30 天)
显示 更早的评论
Hello,
I'd like to calculate the partial correlation between a set of time series of 100 time points each. I put the time series into a matrix, in which the rows correspond to the 100 Time Points and the columns to the number of observations. I tried to calculate it with the following script:
s = size(matrix,2);
X = eye(s);
for i = 1:s; for j = 1:s; d=setdiff(1:s,[i j]); [X(i,j), P(i,j)]=partialcorr(matrix(:,i),matrix(:,j),matrix(:,d));end;end;
Unfortunately it doesn't work and Matlab generates the following error message:
??? Error using ==> corr
Too many input arguments.
Error in ==> partialcorr at 204
coef = corr(resid(:,1:dx),resid(:,dx+1:dx+dy),'type','pearson');
I can't work out a solution on my own. Can anybody help? I would greatly apreciate it.
Cheers, Jessica
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Frequently-used Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!