Hello everyone,
I would like to export the regression table created like this:
and obtain this:
I just want to know if it's possible to add two columns before the one with OR. One with the total frequencies and one with the number of events by category (for example, in this case, the event would be highbp=1). While we're at it, is there a solution to remove the .00 from the ORs of the reference categories?
Thanks in advance.
I would like to export the regression table created like this:
Code:
clear all
webuse nhanes2l
collect : logistic highbp age i.sex
collect style cell result[_r_b _r_ci], nformat(%4.2f)
collect style cell result[_r_ci], cidelimiter(" - ") sformat("[%s]")
collect style row stack , nobinder spacer
collect style header result, title(label)
collect style column, dups(center)
collect label levels result _r_b "OR", modify
collect layout (colname[age sex]) (result[_r_b _r_ci _r_p])
Code:
Result
OR 95% CI p value
Age (years) 1.05 [1.05 - 1.05] 0.000
Sex
Male 1.00
Female 0.65 [0.60 - 0.71] 0.000
Thanks in advance.

Comment