Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: Re: st: calibrated weights


From   Stas Kolenikov <skolenik@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: st: calibrated weights
Date   Thu, 25 Oct 2012 11:28:02 -0500

Nick is right -- the easiest workaround is to have something like

tempvar female_in_agegrp

gen byte `female_in_agegrp' = .
forvalues g=1/`number_of_agegroups' {
   replace `female_in_agegrp' = female * (age_group == `g')
   calibest `female_in_agegrp' , < calibest options >
}

Of course, -calibest- is extremely unwieldy in that it does not
provide the standard estimation results in e(b), e(V), etc. In my
Stata Journal article
(http://stata-journal.com/article.html?article=st0187), I discuss how
to effectively use calibrated estimators via the survey bootstrap in a
way that would be compliant with Stata estimation / post-estimation
paradigm.

On Thu, Oct 25, 2012 at 6:20 AM, Nick Cox <njcoxstata@gmail.com> wrote:
> I haven't been following this, but setting aside -svy- complications,
> the mean proportion is just the mean of any expression yielding 0 or
> 1.
>
> sysuse auto
> egen pr_foreign = mean(foreign), by(rep78)
> tabdisp rep78, c(pr_foreign)
>
> Nick
>
> On Thu, Oct 25, 2012 at 12:12 PM, Tomas Lind <tomas.lind@sll.se> wrote:
>> I have downloaded -calibest- from SSC. There is also a companion ado-file -calibrate- (on SSC) that creates the calibrated weights. In my case I have got a dataset with calibrated weights.
>>
>> I have tried egen with the group() extension but in that case all new subgroups (agegroup by sex) sum to 100%. I want to know the proportion of women in each agegroup (for example).
>>
>> /Tomas
>>
>>
>>
>>
>>
>> -----owner-statalist@hsphsun2.harvard.edu skrev: -----
>> Till: statalist@hsphsun2.harvard.edu
>> Från: Steve Samuels
>> Sänt av: owner-statalist@hsphsun2.harvard.edu
>> Datum: 2012-10-25 00:05
>> Ärende: Re: st: calibrated weights
>>
>> Tomas Lind:
>>
>> Please give a link/source to the unofficial command -caibest- as the FAQ request.
>> To answer your question: create a combination variable that has age-gender categories.
>> You can use  -egen- with the group() extention  or -groups-, by Nick Cox, available
>> from SSC, which will save a data set with the combinations.
>>
>> Steve
>>
>> On Oct 24, 2012, at 7:34 AM, Tomas Lind wrote:
>>
>> Hi Statalist
>>
>>
>> Question about how to analyze survey data with calibrated weights.
>>
>>
>> There is an ado-file calibest that makes it possible to analyze survey data with calibrated weights (ref below). However, it seems impossibly to use calibest to calculate mean values and proportions for men and women _subdivided_ on agegroups (for example). Like you usually do using -over()- or -by- options.
>>
>> Is there a way around this problem?
>>
>>
>> Yours
>> Tomas Lind
>>
>>
>> I´m using Stata 11 on a PC.
>>
>>
>> Reference
>> Deville, J.-C., and C.-E. Särndal.  1992.  Calibration estimators in survey
>>        sampling.  Journal of the American Statistical Association 87:
>>        376-382.
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/



-- 
-- Stas Kolenikov, PhD, PStat (SSC)  ::  http://stas.kolenikov.name
-- Senior Survey Statistician, Abt SRBI  ::  work email kolenikovs at
srbi dot com
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer

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


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