# st: RE: -Makematrix- and -signrank-

 From "Nick Cox" To Subject st: RE: -Makematrix- and -signrank- Date Fri, 13 Feb 2009 19:26:53 -0000

```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
n.j.cox@durham.ac.uk

Herve STOLOWY

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

----------

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/
```