Falko Juessen
> I calculate transition probabilities (multiplied by 100) for
> a variable
> "per" using Nick Cox's -xttrans2- command (for information type -ssc
> describe xttrans2-).
> When specifying the -prob- option, the following error occurs:
>
> . xttrans2 per, prob
> matcell() required
The -prob- option is for saving a matrix of probabilities. -xttrans2-
can't do that unless you also specify a matrix. I guess the help
should make that clearer.
> When I include the matcell option, the following error occurs:
>
>
> . xttrans2 per, prob matcell(T)
>
> | per
> per | .5 .75 1 1.25 1.5 |
> Total
> -----------+--------------------------------------------------
> -----+-------
> ---
> .5 | 3.70 88.89 7.41 0.00 0.00 |
> 100.00
> .75 | 46.55 24.14 29.31 0.00 0.00 |
> 100.00
> 1 | 0.00 13.39 72.32 14.29 0.00 |
> 100.00
> 1.25 | 0.00 0.00 29.31 63.79 6.90 |
> 100.00
> 1.5 | 0.00 0.00 0.00 31.25 68.75 |
> 100.00
> -----------+--------------------------------------------------
> -----+-------
> ---
> Total | 10.33 19.56 43.17 21.40 5.54 |
> 100.00
>
> 1: operator invalid
> r(198);
> The displayed numbers are still frequencies but not probabilities. The
> matrix T contains the same values (frequencies) as displayed in the
> output. Does someone have an idea what I am doing wrong when
> using the -
> xttrans2- command?
Some Stata matrix function is gagging on your implied row
and column name 1.25, so you are being thrown out of
-xttrans2- before the matrix of frequencies has been converted
to probabilities. If you multiply -per- by 100 and live with
the consequences of inaccurate labelling you can get a probability
matrix, I guess.
Nick
[email protected]
*
* 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/