Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Why do i get a failure all the time with this message?


From   "Nichols, Austin" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Why do i get a failure all the time with this message?
Date   Fri, 27 Aug 2004 13:53:04 -0400

No, the count should be 208.  You create indicator variables (taking on
values 0 or 1 only) and then -summarize- them, so the mean of the 0/1
variable is the proportion of individuals who have the variable equal to 1.
The sample over which the mean is computed includes the 0s and the 1s.

The count will bigger than the relevant subpopulation when you use the svy
commands, since -svymean x, subpop(repcell1)- uses all the data, not just
the people with repcell1==1, for better variance estimates. Read -help svy-
and linked resources for more info.

-----Original Message-----
From: jebeling [mailto:[email protected]]
Sent: Friday, August 27, 2004 1:17 PM
To: [email protected]
Subject: st: Why do i get a failure all the time with this message?


I"ve tried to send this to you several times. I get an error message
every time I try, but here is what I wanted to send.


I'm confused by something in svymean and repcat.

Here is what I've done:

I've created some repcat categories using a variable I've created from
the joint cell frequencies on a crosstabulation I've been using, and I
want to use the ci's for each of the joint frequencies. So I did the
following:

. tab cells

    cells |      Freq.     Percent        Cum.
------------+-----------------------------------
        1 |         47       22.60       22.60
        2 |         51       24.52       47.12
        3 |         49       23.56       70.67
        4 |         61       29.33      100.00
------------+-----------------------------------
    Total |        208      100.00


. tab cells, gen(repcell)

     cells |      Freq.     Percent        Cum.
------------+-----------------------------------
         1 |         47       22.60       22.60
         2 |         51       24.52       47.12
         3 |         49       23.56       70.67
         4 |         61       29.33      100.00
------------+-----------------------------------
     Total |        208      100.00


. ci repcell1

  Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
-------------+--------------------------------------------------------------
-

  repcell1 |        208    .2259615    .0290679        .1686545    .2832686

. ci repcell2

  Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
-------------+--------------------------------------------------------------
-

  repcell2 |        208    .2451923     .029901        .1862427    .3041419

. ci repcell3

  Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
-------------+--------------------------------------------------------------
-

  repcell3 |        208    .2355769     .029495        .1774279     .293726

. ci repcell4

  Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
-------------+--------------------------------------------------------------
-

  repcell4 |        208    .2932692    .0316428        .2308857    .3556527


.
Now shouldn't the samples be 47, 51, 49, and 61 for each of the
confidence intervals I've created ci's for?   I used the joint
probabilities found in cells, which is derived from a crosstabulation
for the repcell categories. If anyone can clear me up on this I would
appreciate it.

jon ebeling









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