Your call to -makematrix- is illegal syntax as far as it is concerned.
Hence the message "illegal syntax".
Look at the syntax again:
makematrix [matrix_name] ,
from(results_list) [production_options] [list_options]
:
["]command["] [varlist] ... [, options ]
offer = offer1
is _not_ a varlist. The operator = rules that out.
You want to put two numbers into a matrix. I don't know why, but here is
how to do it after -signrank-
matrix m = J(1,2,.)
matrix m[1,1] = r(z)
matrix m[1,2] = 2*normprob(-abs(r(z)))
-makematrix- is not designed for what you want, but it is not needed
either.
Nick
[email protected]
Herve STOLOWY
In the past, I used -makematrix- (downloadable from ssc) in conjunction
with -ranksum- without any difficulty. I used the following command:
makematrix m1, from(r(z) 2*normprob(-abs(r(z)))) : ranksum offer,
by(info).
Now, I want to use -makematrix- in conjunction with signrank. In a
different file, I have splitted my variable offer in two: offer0 and
offer1.
I do: signrank offer0 = offer1 and I get the following output:
Wilcoxon signed-rank test
sign | obs sum ranks expected
-------------+---------------------------------
positive | 12 9780 16707.5
negative | 29 23635 16707.5
zero | 794 315615 315615
-------------+---------------------------------
all | 835 349030 349030
unadjusted variance 48602428
adjustment for ties -1435
adjustment for zeros -41792686
----------
adjusted variance 6808306.3
Ho: offer0 = offer1
z = -2.655
Prob > |z| = 0.0079
When I do:
makematrix m1, from(r(z) 2*normprob(-abs(r(z)))) : signrank offer0 =
offer1
I get an error message: invalid syntax.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/