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

st: svy commands


From   "Theodoropoulos, N." <[email protected]>
To   <[email protected]>
Subject   st: svy commands
Date   Mon, 21 Oct 2002 19:46:22 +0100

Dear statalisters,

I am using the survey commands in Stata to find some means. I have removed all the stratums in which one psu (primary sampling unit) is detected. I check that there is no stratum with one psu for all my variables by using the svydes command. 
I don't have problems to get the invididual means for the individual variables "general" and "producti". However when i want to find the mean of the "general" variable given that "producti" variable is equal to zero i get the message that a stratum with one psu is detected. The "general" variable is continuous, and the "producti" variable is binary. 
Any hints will be highly appreciated.
Thanks in advance.

Here is a copy of the output that i get.    

 svymean general

Survey mean estimation

pweight:  empwt_nr                                Number of obs    =      1727
Strata:   newstr1                                 Number of strata =        44
PSU:      newpsu1                                 Number of PSUs   =       162
                                                  Population size  = 1200.4609

------------------------------------------------------------------------------
    Mean |   Estimate    Std. Err.   [95% Conf. Interval]        Deff
---------+--------------------------------------------------------------------
 general |   4.156863    .0044976    4.147957     4.16577    2.432631
------------------------------------------------------------------------------

. svymean producti

Survey mean estimation

pweight:  empwt_nr                                Number of obs    =      1727
Strata:   newstr1                                 Number of strata =        44
PSU:      newpsu1                                 Number of PSUs   =       162
                                                  Population size  = 1200.4609

------------------------------------------------------------------------------
    Mean |   Estimate    Std. Err.   [95% Conf. Interval]        Deff
---------+--------------------------------------------------------------------
producti |   .3359512    .0475784    .2417331    .4301693    17.51394
------------------------------------------------------------------------------

. svymean general if producti==0
stratum with only one PSU detected
r(460);   
*
*   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