Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: mrtab with a weight variable


From   "Ben Jann" <[email protected]>
To   [email protected]
Subject   Re: st: mrtab with a weight variable
Date   Thu, 30 Nov 2006 22:58:19 +0100

Sung-jin, the reason is that there are repeated identical responses
for some observations in your data. Such repetitions are only counted
once per observation in a specific call to mrtab. If you want to add
up the repetitions, use the -countall- option.
ben

On 11/30/06, sjyoo <[email protected]> wrote:
Dear colleagues:

Working with multiple responses frequency, I found the followings.

First, I ran two frequency tables as follows.

. mrtab v000318 v000319 v000320 v000321 v000322 v000312 v000313 v000314
v000315 v000316 v000386 v000387 v000388 v000389 v000390 v000380 v000381
v000382 v000383 v000384 [aw=v000002], poly response(166 1201/1297)
includemissing

            |             Percent of     Percent
            |  Frequency   responses    of cases
------------+-----------------------------------
  166   166 |      .9902        0.36        0.05
 1201  1201 |     26.046        9.35        1.44
 1202  1202 |     1.8611        0.67        0.10
 1203  1203 |      .3827        0.14        0.02
 1204  1204 |       .527        0.19        0.03
......
 1242  1242 |      1.223        0.44        0.07
 1244  1244 |      .6881        0.25        0.04
 1247  1247 |     7.6774        2.76        0.42
 1248  1248 |     3.1964        1.15        0.18
 1297  1297 |     1.9941        0.72        0.11
------------+-----------------------------------
      Total |   278.4788      100.00       15.41

Valid cases:       1807
Missing cases:        0

. mrtab v000306 v000307 v000308 v000309 v000310 v000324 v000325 v000326
v000327 v000328 v000374 v000375 v000376 v000377 v000378 v000392 v000393
v000394 v000395 v000396 [aw=v000002], poly response(166 1201/1297)
includemissing

            |             Percent of     Percent
            |  Frequency   responses    of cases
------------+-----------------------------------
  166   166 |    10.7417        0.78        0.59
 1201  1201 |     30.578        2.23        1.69
 1202  1202 |     3.5522        0.26        0.20
 1203  1203 |    16.8357        1.23        0.93
 1204  1204 |   9.882601        0.72        0.55
......
 1243  1243 |     2.4864        0.18        0.14
 1245  1245 |     1.1055        0.08        0.06
 1247  1247 |     3.5882        0.26        0.20
 1248  1248 |     1.2386        0.09        0.07
 1297  1297 |     1.9764        0.14        0.11
------------+-----------------------------------
      Total |   1372.521      100.00       75.96

Valid cases:       1807
Missing cases:        0


Then, I made a frequency table with all the variables used above (with
same options).

. mrtab v000306 v000307 v000308 v000309 v000310 v000324 v000325 v000326
v000327 v000328 v000374 v000375 v000376 v000377 v000378 v000392 v000393
v000394 v000395 v000396 v000318 v000319 v000320 v000321 v000322 v000312
v000313 v000314 v000315 v000316 v000386 v000387 v000388 v000389 v000390
v000380 v000381 v000382 v000383 v000384 [aw=v000002], poly response(166
1201/1297) includemissing

            |             Percent of     Percent
            |  Frequency   responses    of cases
------------+-----------------------------------
  166   166 |    11.7319        0.73        0.65
 1201  1201 |    51.6943        3.20        2.86
 1202  1202 |     5.4133        0.34        0.30
 1203  1203 |    17.2184        1.07        0.95
 1204  1204 |    10.4096        0.64        0.58
......
 1244  1244 |      .6881        0.04        0.04
 1245  1245 |     1.1055        0.07        0.06
 1247  1247 |    11.2656        0.70        0.62
 1248  1248 |      4.435        0.27        0.25
 1297  1297 |     3.9705        0.25        0.22
------------+-----------------------------------
      Total |   1614.174      100.00       89.33

Valid cases:       1807
Missing cases:        0


I think that the sum of totals of the first two tables (278 + 1372)
should be matched with the total of last table (1614). I suspect the
rounding error first, but there is a somewhat large difference between
the totals (about 37).
Why the totals do not match? Is it due to weight? How can I deal with
it?

Please help me with your valuable suggestions.
Thanks you very much.

Sung-jin.
*
*   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/

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index