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]

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   st: Computing margins for a subpop in svy with BRR weights
Date   Wed, 16 Oct 2013 09:02:26 +0000

Dear Stata List members,

Sorry for resending this posting--this version hopefully won't be cut off mid-message...  Best, Rich Carpiano 

***************
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