Statalist The Stata Listserver

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

st: Stata 9 --> sepov is not recongnizing the svyset variables. Any ideas?

From   "Stephen P. Jenkins" <>
To   <>
Subject   st: Stata 9 --> sepov is not recongnizing the svyset variables. Any ideas?
Date   Fri, 20 Oct 2006 09:46:53 +0100


Date: Thu, 19 Oct 2006 09:07:29 -0700 (PDT)
From: Anna Gueorguieva <>
Subject: st: Stata 9 --> sepov is not recongnizing the svyset
variables. Any ideas?

Dear Statalist Brainiacs :),
Switching to stata 9 problem: I need your help to figure out what is
going wrong now that I am using stata 9 (just switched two weeks ago,
yay!!!) with my old code.
Basically, the command sepov which estimates poverty indices taking
into account survey design effects does not preserve the strata and
the psu after svyset (and in 8 it was no problem). 
Here is what I get:
*FIRST stata is reading correctly my variables for the survey set up
svyset [pw=repweight_s], strata(strata_unique)  psu(psu) fpc(fpc)|| _n
      pweight: repweight_s
          VCE: linearized
     Strata 1: strata_unique
         SU 1: psu
        FPC 1: fpc
     Strata 2: <one>
         SU 2: <observations>
        FPC 2: <zero>
*WHEN I CALL THE COMMAND sepov, however, it does not show strata
. sepov real_totc_per_ae [pw=repweight_s], p(povline_m) subpop(wave2)
Poverty measures for the variable real_totc_per_ae: (unlabeled)
Survey mean estimation
pweight:  repweight_s                             Number of obs    =
Strata:   <one>                                   Number of strata =
PSU:      <observations>                          Number of PSUs   =
Subpop.:  ==1                                     Population size  =
    Mean |   Estimate    Std. Err.   [95% Conf. Interval]        Deff
      p0 |   .4513918    .0154961    .4210124    .4817712    2.318254
      p1 |   .1225897    .0053558    .1120899    .1330895    2.152049
      p2 |   .0468943    .0026791    .0416422    .0521465    1.932348
Has anybody dealt with this yet? How do I fix this?
Thank you in advance for your time and support!

Nick Cox and Jeff Pitblado provided useful code and work arounds.  

A third solution is not to use this program at all -- you can
calculate the indices and their standard errors in a couple of lines.
As Nick pointed out, these poverty measures are means, so all one
needs do is generate some appropriate variables first, and then use
-svy- and -mean-, having first -svyset- your data.

For examples, see:

Jenkins, S. P. (2006). 'Estimation and interpretation of measures of
inequality, poverty, and social welfare using Stata'. Presentation at
North American Stata Users' Group Meeting 2006, Boston MA.

Professor Stephen P. Jenkins <>
Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374.  Fax: +44 1206 873151.  
Survival Analysis using Stata: 
Downloadable papers and software:

*   For searches and help try:

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