| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Stata 9 --> sepov is not recongnizing the svyset variables. Any ideas?
From |
[email protected] (Jeff Pitblado, StataCorp LP) |
To |
[email protected] |
Subject |
Re: st: Stata 9 --> sepov is not recongnizing the svyset variables. Any ideas? |
Date |
Thu, 19 Oct 2006 14:03:04 -0500 |
Anna Gueorguieva <[email protected]> is using the user-written -sepov-
command in Stata 9:
> 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 = 4785
> Strata: <one> Number of strata = 1
> PSU: <observations> Number of PSUs = 4785
> Subpop.: ==1 Population size = 3639689.6
> ------------------------------------------------------------------------------
> 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?
The -sepov- command is using -svymean- to perform its calculations, and
-svymean- does not recognize the modern -svyset- characteristics. This means
that -sepov- will only be able to handle survey design settings that were
allowed prior to Stata 9, until someone updates -sepov- to use -svy: mean-
instead of -svymean-. I believe Nick Cox already replied to Anna with some
suggestions for improving/updating -sepov- in this way.
If Anna does not need the new -svy- features in Stata 9, she can call -svyset-
under version 8.2 control to set the characteristics that -svymean- will
recognize without having to modify -sepov-.
Using Anna's example above--and dropping the FPC and second stage--the call to
-svyset- would look like:
version 8.2: svyset [pw=repweight_s], strata(strata_unique) psu(psu)
The call to -sepov- remains unchanged.
--Jeff
[email protected]
*
* 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/