rank_corr - n induce data with correlation xm=zeros(1,nvar...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function rc=rank_corr(corr,nsample) % rc=rank_corr(corr,nsample) % induce rank correlation % Iman, R. L., and W. J. Conover. 1982. A Distribution-free Approach to % Inducing Rank Correlation Among Input Variables. % Communications in Statistics B 11:311-334. % Input: % corr : correlation matrix of the variables (nvar,nvar) % nsample : no. of samples % Output: % rc : rank (nsample,nvar) % Budiman (2004) % nvar=length(corr);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n % induce data with correlation xm=zeros(1,nvar); xs=ones(1,nvar); R=latin_hs(xm,xs,nsample,nvar); T = corrcoef(R); P = chol(corr)'; Q = chol(T)'; Q % use modified cholesky for corr matrix that is not quite positive definite %[L,D,E]=mchol(corr); %P=L*sqrt(D); %[L,D,E]=mchol(T); %Q=L*sqrt(D); % S = P * inv(Q); RB= R*S'; R for j=1:nvar % rank RB [r,id]=ranking(RB(:,j)); rc(:,j) = r; end...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online