Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • URGENT STATA CODE FOR ANALYSIS OF DHS

    Hi, I am new to stata and i was wondering if anyone can help.

    I am analyzing the DHS and I am interested in extracting a subvariable from a variable. I am interested in contraceptive use by region in which contraceptive use has been collected by as region(v010) and contraceptive use(v310) the regions are divided as ss,se,sw, nc,ne,nw (6 regions). i am only interested in ss se and ne regions contraceptive use but i am also interested in analysing contraceptive use in se, ss and ne regions by education, marital status, age, etc. my question is how can i create a new variable that has contraceptive use by ss,se and ne regions so that i can use it for further analysis by age,marital status etc. can anyone advise.
    Last edited by Dami Moks; 25 Aug 2015, 10:54.

  • #2
    Start by reading the "Getting Started with Stata" manual or one of the many Stata tutorials on the Internet.

    You can create a new variable that only has data on contraceptive use in the regions you are interested in. You don't provide information on how the variables in your dataset are coded so please adapt the following command as needed. The example assumes that the values 1, 2 and 3 in the variable v010 identify the regions SS, SE and NE.
    Code:
    gen v310copy = v310 if v010==1 | v010==2 | v010==3
    Please also take a moment to review the FAQ for advice on how to ask questions on Statalist. Here is an excerpt:

    We don't need or want detailed explanations of how much you need help, how urgent it is for you, or how grateful you will be for attention.

    Comment


    • #3
      thanks Friendrich for pointing out FAQ , i was not aware and will rephrase in future.

      Comment


      • #4
        I'll add that CAPITALIZATION in the forum amounts to shouting in a class room.
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment

        Working...
        X