Announcement

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

  • Index Variable

    Hello everyone

    The outcome variables of my study will be knowledge of MTCT. It will be a composite score of five different questions.
    Ever heard of HIV, HIV transmitted by breast feeding, HIV transmitted during delivery, HIV transmitted during pregnancy, Drugs to avoid transmission of HIV to baby

    Responses will be coded as 1 = Yes and 0 = No. The outcome of interest for this analysis will be “women’s correct knowledge of MTCT” and will be defined as “yes” if the respondent correctly answers 4 or more than four out of five questions and “no” if the respondent fails to answer 3 or more than three out of five . You may take the outcome as HIV1 HIV2 HIV3 HIV4 HIV5

    Please may you help me with a command that can help me generate the index variable. Thanks

  • #2
    I suggested code already at https://www.statalist.org/forums/for...-into-tertiles #11

    Comment


    • #3
      Code:
      generate index = (HIV1 + HIV2 + HIV3 + HIV4 + HIV5) >= 4
      Last edited by Øyvind Snilsberg; 24 Aug 2022, 05:02. Reason: crossed with #2

      Comment

      Working...
      X