Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: coding for McClements equivalence scale


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: coding for McClements equivalence scale
Date   Wed, 30 Jul 2008 17:11:10 +0100 (BST)

The example below works in the example you have given, and you can use
that as a place to start. You'll have to adapt it in such a way that it
also accomodates the weird households that will be present in every
real dataset. For example, student housing can sometimes result in some
pretty weird outliers with 8 or 10 adults who are not related to one
another. These weird households are usually not identified as abnormal
in your data, it is upto you to find out that there is something
strange going on, and find some solution for them. 

Hope this helps,
Maarten

*------------------- begin example ---------------------
drop _all
input Household       Individual      Age         
1               1                23
1               2                8
2               1                55 
2               2                57
2               3                2
end

gen adult = Age > 18 if Age < .
bys Household adult : gen Nadult = _n if adult == 1
gen iscale = cond(Nadult == 1, .61, ///
            cond(Nadult == 2, .39, ///
            cond(Age <=1, .09, ///
            cond(Age <= 4, .18, .27))))
bys Household: egen tscale = total(iscale)
list
*-------------------- end example -------------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )

--- Cindy Gao <cindy.gao@ymail.com> wrote:
> I using household survey data and I like to code my households
> according to the McClements adult equivalence scale (used in
> analysing income distribution). I wonder if there is a easy way to do
> this in Stata.. My data looks like so:
> 
> Household       Individual      Age         Income   etc
> 1                           1                23
> 1                           2                8
> 2                          1                55 
> 2                            2             etc
> 2
> 3
> 
> For the McClements scale we need a household income conversion
> coefficient as follows:
> 0.61 for adult1
> 0.39 for spouse
> 0.09 for dependent aged 0-1 year
> 0.18 for dependent aged 2-4 year
> etc.
> 
> I will then divide the household income by that coefficient.


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
*
*   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