Announcement

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

  • how to calculate dependency ratio in STATA

    Please let me know how to calculate dependency ration in STATA.. is the command below correct

    bys ScheduleNo: egen Age_Working = count(B2Q1) if Age>=15 & Age<=64
    bys ScheduleNo: egen count_Age_Working= max(Age_Working)
    recode count_Age_Working (.=0)
    bys ScheduleNo: egen Age_Dep = count(B2Q1) if Age<=14 | Age>=65
    bys ScheduleNo: egen count_Age_Dep= max(Age_Dep)
    recode count_Age_Dep(.=0)
    gen DRatio = (count_Age_Dep/count_Age_Working)*100
    recode DRatio(.=0)

  • #2
    After 25 posts you should have read all the way down to https://www.statalist.org/forums/help#spelling in the FAQ Advice.

    Otherwise please note what I said on your last thread. No data example here. What is the dependency ratio (not ration) any way? What is B2Q1 any way? The only way anyone could know is that they have worked on the same dataset as you.

    Comment


    • #3
      Thanks Nick got it... I am trying to calculate dependency ratio on "stata"..
      ScheduleNo - common identification for household units ; B2Q1 :individual serial number.. i want to know what is the dependency ratio in each household.. so ran this command

      bys ScheduleNo: egen Age_Working = count(B2Q1) if Age>=15 & Age<=64
      bys ScheduleNo: egen count_Age_Working= max(Age_Working)
      recode count_Age_Working (.=0)
      bys ScheduleNo: egen Age_Dep = count(B2Q1) if Age<=14 | Age>=65
      bys ScheduleNo: egen count_Age_Dep= max(Age_Dep)
      recode count_Age_Dep(.=0)
      gen DRatio = (count_Age_Dep/count_Age_Working)*100

      i just wanted to confirm if this is fine?

      Comment


      • #4
        Again, please explain dependency ratio.

        Comment


        • #5
          dependency ratio is dependent population / working population *100

          Comment


          • #6
            It appears that you have data on households, so I do not see how the age dependency ratio is useful in this context. For practical purposes, this is a macro-level variable and is useful if comparing countries. For households, children who are of working age usually move out of the household and have their own families. Their continued presence in the household could in fact signal that there are dependent on other household members. Households have either one or two parents present, so a count of the number of children living in the household should be a good proxy for what you need.

            Comment


            • #7
              With some guesses, I get

              Code:
              bysort ScheduleNo : egen numerator = total((Age <= 14 | Age >= 65) & Age < .)
              by ScheduleNo : egen denominator = total(inrange(Age, 15, 64))
              gen wanted = 100 *  num / den

              Comment


              • #8
                Thank You nick .. .. you made my task easier.. Andrew i thought of looking something on remittance use so thought of taking dependency ratio .. and i agree with your..point too.. my data is both at individual and household level .. though my main analysis is at household level.

                Comment

                Working...
                X