I need to write a funtion or module that creates a row vector called doit of dimmesion k(k-1)/2 that contains the pairwise differences between the k leverl means. I need nested do loops
doit[i,j]= Yi0 hat- Yjo hat
below is my code
a=3; # k level (maybe I can replace it with ncol (mymatrix)?)
doit={};
do i= 1 to a;
do j = i to a;
dime = group_mean[i]-groupmean[j];
doit= doit||dime;
end;
end;
but it does not work. ANy other suggestions to make it work? Any other solutions