Several different issues arise here.
1. When you type what you did, the official Stata
command -tokenize- called within -makematrix-
fails because it objects, as reported, to
tokenize r(chi2_adj) max(chiprob(r(df),r(chi2_adj)+1e-20),.0001)
At this moment, I am hard pushed to see whose bug this is,
mine or Stata's, as -tokenize- professes to tokenize
on spaces unless otherwise instructed. The Statalist FAQ
does advise me not to say that something is a bug, because
it usually isn't. However, compare, for example,
. local 2 : word 2 of r(chi2_adj) max(chiprob(r(df),r(chi2_adj)+1e-20),.0001)
. di "`2'"
max(chiprob(r(df),r(chi2_adj)+1e-20),.0001)
which works as I expect. In short, -makematrix- can't cope with
what you want, but in principle that might be my bug.
2. In your example, you want to pick up just two numbers from
-kwallis- and put them in a matrix. You don't need -makematrix-
to act as middle man here.
Just run
. kwallis ...
. mat m2 = J(1,1, r(chi2_adj))
. mat m2 = m2, chiprob(r(df),r(chi2_adj))
Incidentally,
max(chiprob(r(df),r(chi2_adj)+1e-20),.0001)
looks like a bit of kludge-fudge to avoid very small
P-values. That is not documented in [R] kwallis, but there may
be good authority for it.
3. I note your more general comments. Like many users
you are in transition between dependence on what others
have written and wanting more control over the output
you get. Ultimately, you will have to learn some
Stata programming to get what you want, as what others
have written may often not be exactly what you want.
Nick
[email protected]
Herve STOLOWY
> Dear Nick:
>
> Sorry to bother you. I tried without the spaces and I get the
> same error message.
>
> Anyway, I perfectly understand your message. The program you
> designed works perfectly and solved the problem.
>
> (One more word on -makematrix-. Again, I understand what you
> say. Please, don't be at a loss because of me. I simply liked
> -makematrix- because I feel more independent - including from
> statalisters - with this command and I can adapt it to many
> descriptive statistics and univariate tests, which are very
> important in my field, financial accounting. With the
> solution of already designed commands, I don't have the same
> freedom, because I don't know how to program and modify them,
> if would like to. That's all).
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/