Wilcoxon rank-sum test starting from a multivariate array
9 views (last 30 days)
Show older comments
Good afternoon,
I would like to perform the Wilcoxon rank-sum test. To do it, I would need two vectors of data. For now, I have only N time series for my two variable of interest (which are "z" and "pi"). I was wondering whethere there is a way to "aggregate" such time series (in such a way to have 1 vector of aggregated time series for "z" and 1 vector of aggregated time series for "pi") in order to run the test.
I recall that my time series have dimension (1xTxN), where T and N are number deliberately choosen by me.
I also would like to polot the ECDF (Empirical cumulative distribution function) after having aggregate my time series.
In the following there is my code.
Thank you for your help,
T=1000;
sigma=0.157;
k=0.3;
beta=0.99;
po=0.35;
phipi=1.5;
phiz=0;
B2=[sigma 1-beta*phipi; k*sigma k+beta*(sigma+phiz)]
B1=1/(sigma+phiz+k*phipi)
B=B1*B2
y=NaN(2,T);
y(1,1)=0.1
y(2,1)=0.2
kappa=[1/(sigma+phiz+phipi*k); k/(sigma+phiz+phipi*k)]
a=NaN(2,T);
a(1,1)=1
a(2,1)=2
N=100
rn=randn(1,T);
for n=1:N
for t=2:T
y(:,t,n)=B*a(:,t-1)+kappa*rn(:,t);
a(:,t)=a(:,t-1)+t^(-1)*(y(:,t)-a(:,t-1));
end
end
z=y(1,:,:) ;
pi=y(2,:,:);
0 Comments
Answers (0)
See Also
Categories
Find more on ANOVA in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!