Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: oaxaca with subpop in svy


From   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: oaxaca with subpop in svy
Date   Wed, 15 Jul 2009 15:05:28 -0400

Maggie Hicken<mhicken@umich.edu> :
Make variables that are defined only for your desired subsample, e.g.

webuse nhanes2, clear
g male=sex==1 if sex<.
g mblack=black if male==1
oaxaca bpsystol weight, by(mblack) svy
* not:
oaxaca bpsystol weight, by(black) svy
* compare :
svy, subpop(male): reg bpsystol black
svy: reg bpsystol mblack

On Wed, Jul 15, 2009 at 2:51 PM, Maggie Hicken<mhicken@umich.edu> wrote:
> Thanks -- Yes, I understand that I can use 'svy' with 'oaxaca' -- but I need
> to specify subsamples of the entire NHANES.  For example, I want to analyze
> only women who are black or white.  For 'regress', I would specify the
> 'subpop' option with the 'svy' prefix.  But for the 'oaxaca' command, I get
> an error message when trying to specify a subpopulation with the 'svy'
> option (saying that it doesn't support the subpop option).
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Richard Williams
> Sent: Wednesday, July 15, 2009 3:43 PM
> To: statalist@hsphsun2.harvard.edu; statalist@hsphsun2.harvard.edu
> Subject: Re: st: oaxaca with subpop in svy
>
> At 01:01 PM 7/15/2009, Maggie Hicken wrote:
>>Hi,
>>
>>I would like to use the 'oaxaca' command using 'svy' in NHANES, but need to
>>use the 'subpop' option of 'svy' to have the correct SEs.  Is there a way
> to
>>use the 'subpop' option?  Or does anyone have an alternative that would
>>yield the SEs that I need in Oaxaca with a complex survey design?
>>
>>Thanks for your help!
>>Maggie
>
> It says how to do it in the oaxaca help file.  Instead of an svy
> prefix, you use an svy option.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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