Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: Re: st: Computing margins for a subpop in svy with BRR weights


From   "Carpiano , Richard" <Richard.Carpiano@ubc.ca>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   Re: Re: st: Computing margins for a subpop in svy with BRR weights
Date   Fri, 18 Oct 2013 09:49:50 +0000

Thanks so much for your very helpful clarifications, Steve.  

Best,
Rich


_____________________________________ 
Richard M. Carpiano, PhD, MA, MPH
Associate Professor of Sociology
Associate Member, School of Population and Public Health
University of British Columbia
6303 Northwest Marine Drive
Vancouver, British Columbia CANADA V6T 1Z1
Phone: 604-822-3845 / Fax: 604-822-6161
E-mail: richard.carpiano@ubc.ca
Website: http://www.soci.ubc.ca/index.php?id=11325



------------------------------

Date: Thu, 17 Oct 2013 22:07:45 -0400
From: Steve Samuels <sjsamuels@gmail.com>
Subject: Re: st: Computing margins for a subpop in svy with BRR weights

Welcome to Statalist, Richard.  


> 1. Since the equation in line 13 is not specifying "svy, subpop(missing_vars==0):" (it won't run if I include this), do I need to be concerned that the resulting standard errors are incorrectly computed?  Or does the "svy brr _b" command in line 15 take care of this?

The standard errors are correct. If you look again at the -help- for -margins-, you will see that your subpop() statement is in the right place. 


> 2. Is the "coeff" column in the final table indicating the dy/dx for each indep var-that is, the dy/dx computed based on the pweights and brr weights in the svy?

Yes, but you could have seen this for yourself by running your -biprobit- outside your program, with a  [pweight=] statement and an  "if" statement to subset to your subpopulation .  With survey data, stimated marginal effects are functions only of the probability weights, and you should see that the nicely formatted effects match those in the "coeff" column of your results. (The stratification, replicate weights, and subpop() options influence only the standard errors.)


Steve
sjsamuels@gmail.com

On Oct 16, 2013, at 5:26 AM, Carpiano , Richard wrote:

Dear Stata List members,

Sorry for resending this posting--this version hopefully won't be cut off in the archive mid-message...  Best, Rich Carpiano (first time poster)

***************
Greetings.  I am writing to inquire about properly specifying syntax for computing margins for a subpop in a svyset datafile.  To be sure, I have attempted to be as succinct as possible in this note, but it is a little tough given the nature of the problem.

I am trying to compute average marginal effects on a subpop from a svyset datafile that uses brr weights.  Though replication weights are not supported with the margins command, Stata 13's manual on page 114 (under -svy postestimation-) provides programming code that one can run to obtain those margin estimates.  Here is that program syntax from the manual:

program mymargins, eclass
version 13
syntax anything [if] [iw pw]
if "`weight'" !=3D "" {
local wgtexp "[`weight' `exp']"
}
set buildfvinfo on
`anything' `if' `wgtexp'
margins race, post
e*n*d
*NB: separated the letters with asterisks only b/c this seems to be the culprit for the missing remainder of earlier posts



© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index