Statalist


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

Re: st: DHS Ghana variable construction question


From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   Re: st: DHS Ghana variable construction question
Date   Wed, 29 Jul 2009 13:13:22 -0400

Tharshini,

You introduce unnecessary complications by looking at variables like
v730 or v447a. You already know how to create variables with the
mother's and father's age.

The household member recode file from the Ghana DHS 2003 allows us to
identify the mother's age for 9411 children. 9409 of these children
have mothers that are at least 15 years old. Two children supposedly
have mothers aged 5 years but we can assume that this is an error that
was introduced during data collection or subsequent processing by
survey staff. Household survey data cannot be guaranteed to be without
error.

How do you identify the mother's and father's level of education or
any other characteristic? Take the commands used to identify the
parents' ages and replace the age variable hv105 by the respective
variable of interest, for example hv109 with a person's educational
attainment.

bysort hhid (hvidx): gen med = hv109[hv112]
bysort hhid (hvidx): gen fed = hv109[hv114]

Whether you have to merge your data with additional datasets, for
example the individual recode file, is determined by the needs of your
research project.

Friedrich

P.S. List members who follow this thread and are not familiar with the
Demographic and Health Surveys will find a description of the data
under discussion at the following URL.

http://www.measuredhs.com/aboutsurveys/search/metadata.cfm?surv_id=235&ctry_id=14&SrvyTp=country

On Wed, Jul 29, 2009 at 12:15 PM, Tharshini
Thangavelu<[email protected]> wrote:
> Friedrich,
>
> Thanks! I followed the new way, which actually gave the same results as one of
> the previous case. I did it in the original dataset, ie. household member
> report. It seems strange that mothers' age have min value of 5. When tabulating,
> only one observation had value 5. I assumed that it is missing value and
> replaced it.
>
> sum mage fage
>
>    Variable |       Obs        Mean    Std. Dev.       Min        Max
> -------------+--------------------------------------------------------
>        mage |      9411    35.21177    8.643875          5         76
>        fage |      7265    44.92953    12.64342         19         99
>
> ________________________________________________________________________
> The following output is to show the difference between in the two variables
> which normally should be the same. I still have not figured out why this is not
> the case.
>
>
> . sum v730 fage
>
>    Variable |       Obs        Mean    Std. Dev.       Min        Max
> -------------+--------------------------------------------------------
>        v730 |      4463    40.52028    11.91459         18         99
>        fage |      7265    44.92953    12.64342         19         99
>
> . sum v447a mage
>
>    Variable |       Obs        Mean    Std. Dev.       Min        Max
> -------------+--------------------------------------------------------
>       v447a |      6502    29.45709    9.297519         15         49
>        mage |      9409     35.2182    8.633561         15         76
>
>
>
> Until now I have used the variables v730 partners age, I assumed this as fathers
> age and mothers age as v447a (womens age in years from household report.) For
> education I used hc62 and v702 respectively. The method that was introduced by
> finding the mothers and fathers age by including hhid hvidx is new for me and
> confusing.
>
> How do I now find mothers and fathers education level?
>
>
> Does this mean that I don't have to merge with the individual recode file once I
> have merged with anthropometric and household member data?
>
> I think I am getting rather confused about how to work with microlevel data. I
> actually did some regression outputs but I was working with the dataset which
> had 3402 observation. That is I had deleated _merge variable and kept == 3(both
> using and master data.)
>
> Tharshini
>
>
> On 2009-07-29, at 15:12, Friedrich Huebler wrote:
>> Tharshini,
>>
>> Your excerpt from the data shows that you changed the sort order
>> before you created the variables mage and fage. Try this:
>>
>> bysort hhid (hvidx): gen mage = hv105[hv112]
>> bysort hhid (hvidx): gen fage = hv105[hv114]
>>
>> Friedrich

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index