# st: XTTRANS: discrepancies in the number of observations

 From Carol Bao To statalist@hsphsun2.harvard.edu Subject st: XTTRANS: discrepancies in the number of observations Date Wed, 14 Jun 2006 11:07:41 -0700 (PDT)

```Hi,

I have a panel data and using XTTRANS command I get a
matrix as follows:

|                   stat
stat |         0          1          2
3 |     Total
-----------+--------------------------------------------+----------
0 |       843      1,989        139
126 |     3,097
|     27.22      64.22       4.49
4.07 |    100.00
-----------+--------------------------------------------+----------
1 |     1,294     13,259      1,987
867 |    17,407
|      7.43      76.17      11.41
4.98 |    100.00
-----------+--------------------------------------------+----------
2 |        99      1,547      1,271
834 |     3,751
|      2.64      41.24      33.88
22.23 |    100.00
-----------+--------------------------------------------+----------
3 |       127        837        693
2,155 |     3,812
|      3.33      21.96      18.18
56.53 |    100.00
-----------+--------------------------------------------+----------
Total |     2,363     17,632      4,090
3,982 |    28,067
|      8.42      62.82      14.57
14.19 |    100.00

First of all, the total number of observations here,
28067 is not the same as (fewer than) the number of
observations for the sample if I do .sum.  Also, if I
do:

. tab stat if lag==0;

stat |      Freq.     Percent        Cum.
------------+-----------------------------------
0 |        946       27.59       27.59
1 |      2,174       63.40       90.99
2 |        166        4.84       95.83
3 |        143        4.17      100.00
------------+-----------------------------------
Total |      3,429      100.00

The number of observations don't equal to the
corresponding ones in the first row of the matrix
either.

I really appreciate it if anyone could kindly give me
some information or tips as to what I am missing here.
Each person has only one spell of observations on STAT
in the sample, though the numbers of observations per
spell diff.

Thank you so much in advance,

Carol

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
*   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/
```