Announcement

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

  • Extract betta, p-values, and 95%CI

    Hi,

    I'm seeking assistance in creating a table from my regression models. I have conducted several simple regression analyses and want to extract coefficients (or odds ratios in the case of logistic regression), p-values, and 95% confidence intervals for each variable.

    For example, if I'm performing the following regressions:
    1. logit Cancer Age,
    2. logit Cancer i.Sex,
    3. logit Cancer i.BMI.
    I aim to organize the output in Excel resembling the table below or a similar format (the closest format to this)
    Variable OR p-value 95%CI
    Age 0.2 0.876 0.01; 1.3
    Sex
    Male ref
    Female 2.1 0.044 1.24; 4.45
    BMI
    Normal ref
    Underweight 0.4 0.677 0.22; 0.77
    Overweight 2 0.002 1.31; 6.46
    Obese 5.5 0.765 0.55; 9.11
    The closest command I've come up with is:

    eststo: quietly logit Cancer Age, or
    eststo: quietly logit Cancer i.Sex, or
    eststo: quietly logit Cancer i.BMI, or

    esttab _all , cells("b(fmt(a3) star) p ci")

    I appreciate any suggestions or improvements to achieve a table format similar to the one described above
    Last edited by Nada Abbas; 10 Mar 2024, 07:12.
Working...
X