Announcement

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

  • Stratifying in logistic regression

    Hello, I am attempting to conduct a logistic regression and I want to stratify by a group that I have created called tri_site (This represents trimester of pregnancy and hospital attended)

    The outcome variable is fluvac_thispreg_y_n

    I am not sure if I am approaching the coding correctly.

    Any advice would be appreciated.

    Click image for larger version

Name:	logit code 27112018.PNG
Views:	1
Size:	4.3 KB
ID:	1472257


    Many thanks
    Jocelynne


  • #2
    Jocelynne:
    try:
    Code:
    bysort tri_site: <your regression code>
    Last edited by Carlo Lazzaro; 27 Nov 2018, 04:33.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      I suggest stratifying by the two component characteristics separately, just like the stratification that you're doing with all of your other predictors.
      Code:
      logistic fluvac_thispreg_y_n ///
          i.(first_preg2 age_grp2 indigenous4 education_grp non_english irsad_grp trimester clinic)

      Comment


      • #4
        Thank you both, I'll give it a go.
        Regards
        Jocelynne

        Comment

        Working...
        X