Hi Allin,
Indeed, on my W7 PC with the new snapshot the 'evals' are not the same. The order
within the bins is different.
I expected the null operation and checked other parts of the code until I found the reason
explained.
I gonna try with 'matrix K' instead of the ~ operation and report then.
Best
Leon
Am 07.11.2012 um 19:35 schrieb Allin Cottrell <cottrell(a)wfu.edu>:
On Wed, 7 Nov 2012, Pindar wrote:
> when working on my multivariate statistic package I found the following bug
> in function msortby:
> If one wants to sort an already sorted matrix the matrix elements get though
> rearranged.
> In the 2-factor Anova with interaction this results in wrong calculations.
>
> <hansl>
> nulldata 24
> #two factor orthogonal Anova
> matrix FaktorA={1;1;1;1;1;1;2;2;2;2;2;2;3;3;3;3;3;3;4;4;4;4;4;4}
> matrix FaktorB={1;1;2;2;3;3;1;1;2;2;3;3;1;1;2;2;3;3;1;1;2;2;3;3}
> matrix
> OutputM={69;77;61;67;65;69;79;83;62;64;72;78;80;78;74;76;80;74;75;67;70;62;70;76}
>
> eval OutputM~FaktorA
> eval msortby(OutputM~FaktorA,2)
> <hansl>
Hmm, I'm not seeing anything wrong with gretl's output on
this. I take it your point is that, since FaktorA is already
in sort order, msortby() should be a null operation and the
two "evals" above should give the same output -- but that in
fact they don't?
Here they do give the same. To check explicitly:
<hansl>
matrix
FaktorA={1;1;1;1;1;1;2;2;2;2;2;2;3;3;3;3;3;3;4;4;4;4;4;4}
matrix
FaktorB={1;1;2;2;3;3;1;1;2;2;3;3;1;1;2;2;3;3;1;1;2;2;3;3}
matrix \
OutputM={69;77;61;67;65;69;79;83;62;64;72;78;80;78;74;76; \
80;74;75;67;70;62;70;76}
matrix K = OutputM ~ FaktorA
matrix P = msortby(K, 2)
Test = K - P
print Test
</hansl>
Here the Test matrix is all zeros.
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users