Announcement

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

  • Need help with identifying distinct number of individuals within a particular household, participating in activity 1

    In other words, for any combination of household level and Individual level datafiles, I need to find the no.of distinct individuals who participate in certain activity. For example my Household identifier is HHID and individual identifier is PERSONID. I have indicator variables for person participating in activity 1. I want to see how many individuals are participating in activity 1 within a particular household. Can someone please help me how to do it in STATA. Thankyou very much in advance. Also, happy to provide any further details for more clarification on my question.

  • #2
    Also, my data is a two period panel data. So in particular, I want to see no.of individuals from each unique household participating in an activity in a specific year

    Comment


    • #3
      Please see https://www.statalist.org/forums/help#stata and https://www.statalist.org/forums/help#spelling in the FAQ Advice all posters are asked to read before posting.

      From your information the pattern sounds like

      Code:
      egen count1 = total(activity1), by(hhid year)
      and you can get similar variables with a loop.

      Comment


      • #4
        Nick Cox Thankyou so much that helped ! Also thankyou for the links with instructions to post. Will keep them in mind.

        Comment

        Working...
        X