Hello there!
I'm doing a code for aleatorization test on my graduation and I'm stuck in one thing.
I have a column vector and I wanna change the order (randomly) of the number os my vector... how can I do it on IML?
data tensao1;
input tensao @@;
cards;
16.85 16.40 17.21 16.35 16.52
17.04 16.96 17.15 16.59 16.57
;
run;
data tensao2;
input tensao @@;
cards;
16.62 16.75 17.37 17.12 16.98
16.87 17.34 17.02 17.08 17.27
;
run;
proc iml;
reset print;
use tensao1;
read all into y1;
use tensao2;
read all into y2;
n1=nrow(y1); n2=nrow(y2);
y1_2=y1#y1;
y2_2=y2#y2;
s1=sum(y1_2)/n1-(sum(y1)/n1)**2;
s2=sum(y2_2)/n2-(sum(y2)/n2)**2;
sp=((n1-1)*s1+(n2-1)*s2)/(n1+n2-2);
est_t=((sum(y1)/n1)-(sum(y2)/n2))/(sp*sqrt(1/n1+1/n2));
p_valor=probt(est_t,n1+n2-2);
s1=var(y1);
y=y1//y2;
here I wanna change the order of the numbers and make another matrix y... So i'll have another matrix y1 and y2
y_1=y[1:n1,];
y_2=y[n1+1:n1+n2];
Anyway... sorry about the mess... After I discover it I'll redesign it! =P
... View more