Announcement

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

  • combine variables

    Hello! I have mode of delivery var with 2 options (SVD and CS), and induction var with 2 options(Yes and No). Each variable has different number of observations. I need to combine SVD, CS and Yes to be one var with 3 options. How do I do that? Thank you

  • #2
    On the face of it

    Code:
    egen combined = group(mode induction), label
    would define up to 4 distinct possibilities. Naturally if your variable names are not mode induction, you need to give the names you use.

    For a brief but focused discussion of technique, see https://journals.sagepub.com/doi/pdf...867X0800700407

    If this doesn't help, please visit https://www.statalist.org/forums/help#stata 12.2, give us a data example using dataex, and explain why not.

    Comment


    • #3
      Thank you so much

      Comment


      • #4
        Then, how do I create 10 groups from Robson classification system using ; gestation age,

        Comment


        • #5
          Then, how do I create 10 groups from Robson classification system using ; gestation age,

          Comment


          • #6
            Then, how do I create 10 groups from Robson classification system using different variables to make one group. Example ;Group 1 (Nulliparous, single cephalic, ≥37 weeks, in spontaneous labor), group 2(Nulliparous, single cephalic, ≥37 weeks, labor induced) etc

            Comment


            • #7
              #4 #5 #6 require some knowledge of the Robson classification system to answer. I fail the test.

              Comment


              • #8
                THE ROBSON CLASSIFICATION SYSTEM
                The system classifies all women admitted for delivery into one of 10 groups, based on a few basic obstetric variables. Accordingly, every woman admitted to deliver in any facility can be classified into only one of the 10 groups and not otherwise. No woman will be left out of the classification because, Robson classification is for all women who deliver at a specific setting and not only for those who deliver by CS (WHO, 2017).
                The table below shows the 10 Robson groups as explained by (Robson, 2001)
                Groups characteristics
                1 Nulliparous, single cephalic, ≥37 weeks, in spontaneous labor
                2a Nulliparous, single cephalic, ≥37 weeks, labor induced
                2b Nulliparous, single cephalic, ≥37 weeks, CS before labor
                3 Multiparous (excluding previous CS), single cephalic, ≥37 weeks, in spontaneous labor
                4a Multiparous (excluding previous CS), single cephalic, ≥37 weeks, induced labor
                4b Multiparous (excluding previous uterine scar), single cephalic, ≥37 weeks, CS before labor
                5 Multiparous, previous uterine scar, single cephalic, ≥37 weeks
                6 All nulliparous, breeches
                7 All multiparous breeches including previous uterine scars
                8 All multiple pregnancies including previous uterine scars
                9 All abnormal lies (transverse/oblique) including previous scars
                10 All single cephalic, <37 weeks including previous scars

                Comment


                • #9
                  Originally posted by Rauthere Kheir View Post
                  THE ROBSON CLASSIFICATION SYSTEM
                  The system classifies all women admitted for delivery into one of 10 groups, based on a few basic obstetric variables. Accordingly, every woman admitted to deliver in any facility can be classified into only one of the 10 groups and not otherwise. No woman will be left out of the classification because, Robson classification is for all women who deliver at a specific setting and not only for those who deliver by CS (WHO, 2017).
                  The table below shows the 10 Robson groups as explained by (Robson, 2001)
                  Groups characteristics
                  1 Nulliparous, single cephalic, ≥37 weeks, in spontaneous labor
                  2a Nulliparous, single cephalic, ≥37 weeks, labor induced
                  2b Nulliparous, single cephalic, ≥37 weeks, CS before labor
                  3 Multiparous (excluding previous CS), single cephalic, ≥37 weeks, in spontaneous labor
                  4a Multiparous (excluding previous CS), single cephalic, ≥37 weeks, induced labor
                  4b Multiparous (excluding previous uterine scar), single cephalic, ≥37 weeks, CS before labor
                  5 Multiparous, previous uterine scar, single cephalic, ≥37 weeks
                  6 All nulliparous, breeches
                  7 All multiparous breeches including previous uterine scars
                  8 All multiple pregnancies including previous uterine scars
                  9 All abnormal lies (transverse/oblique) including previous scars
                  10 All single cephalic, <37 weeks including previous scars
                  from that table, I want to create those groups based on table variables that I have already categorized I do not know how to combine to make these groups

                  Comment


                  • #10
                    That is part of the question, thanks, but the other has to be some concrete examples of how you are holding data on such variables.

                    I don't promise an (eventual) answer that works.

                    My best guess is that you may need some rather complicated code. I trust that you have carried out a search for Stata code, as any classification that is standard has probably been used by some previous Stata users.

                    Equally this is a long, long way from any data I ever use.

                    Comment


                    • #11

                      Thank you for your concern I tried ang got this one, though I got an error of mismatch type "first step gen robson_group = . second step egen robson_group = max(robson_group, 1) if parity == 0 & multiple_pregnancy == 0 & fetal_presentation == "Cephalic" & labor_type == "Spontaneous" " and you do that for other groups

                      Comment


                      • #12
                        That is part of the question, thanks, but the other has to be some concrete examples of how you are holding data on such variables.
                        Still true.

                        Code:
                        egen robson_group = max(robson_group, 1)
                        is illegal in any case. It is undoubtedly confusing until you understand it, or get used to it, but max() within egen and max() outside egen are different functions with different rules. That code would fail also for another reason, that you can't create a new variable with the same name as an existing variable.

                        Possibly you want

                        Code:
                        replace robson_group = max(robson_group, 1)

                        Unfortunately this thread won't progress far or fast unless you give a data example as we ask and present code readably within CODE delimiters. All explained at https://www.statalist.org/forums/help#stata

                        Comment

                        Working...
                        X