Announcement

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

  • multiple logistic regression by groups

    Hi Friends,

    I am fairly new to Stata and trying to learn the strings of statistical analysis using Stata more efficiently.

    I am trying to do multiple logistic regressions by groups i.e by regions.
    Logit per say wouldnt run if i use it by(groups)
    I also tried clogit,

    clogit tuberculosis smoker i.age_group , group(region)

    But i got an error message
    5872 (group size) take 295 (# positives) combinations results in numeric overflow; computations cannot proceed
    r(1400);

    I there a better way of doing this? Also instead of me copy pasting the results i would like to get the results in an excel or stata file. How can I?

    Thanks in advance for your help!

    Regards
    Sujata
    Sujata Mishra

  • #2
    as the FAQ says, please show us exactly what you typed (for your logistic); you can certainly do something like the following: by groups: logistic y x

    Comment


    • #3
      Hi Rich,
      Thanks for the response. Mine is a case control data and i want to find the odds ratios of having TB(outcome) if smoker (exposure) _ age adjusted by regions

      My data looks like this

      input respondent_id region tb smoker case_control age_group_cat age_group
      NVL001 1 1 1 1 2 30-45
      NVL012 2 0 0 1 2 30-45
      NVL023 3 0 1 1 3 46-60
      NVL034 2 1 1 1 1 <30
      NVL045 1 0 0 0 1 <30
      NVL056 1 1 1 1 3 46-60
      NVL067 3 0 0 0 3 46-60
      NVL078 2 1 1 1 2 30-45
      NVL089 3 1 0 1 2 30-45
      NVL0910 2 0 1 1 3 46-60
      NVL1011 2 1 1 1 1 <30
      NVL1112 1 0 0 0 1 <30
      NVL1213 3 1 1 1 3 46-60
      NVL1314 3 0 1 1 3 46-60
      NVL1415 3 0 0 0 1 <30
      NVL1516 2 0 1 0 2 30-45
      NVL1617 1 0 0 0 2 30-45
      NVL1718 2 0 1 0 3 46-60
      NVL1819 1 0 1 0 2 30-45
      NVL1920 3 0 1 0 3 46-60

      I tried using- by regions, sort: logistic tb smoker i.age_group_cat, or
      But the problem is they pop up at different tables. Since I have 235 such regions, I want the results to come together in one table or if possible output the tables into an excel sheet. Instead of me having to copy paste the tables one by one.

      Thanks again
      Sujata
      Sujata Mishra

      Comment


      • #4
        see the help for -statsby-

        Comment

        Working...
        X