A frequent problem I have in Stata is that I have to run different regression models (for example an unadjusted model, one adjusted for just age and sex, and one adjusted for age, sex, and other parameters). I am looking for a rapid way to put the output of these models into one table for easy comparison and to be able to send it to others. Currently I do a lot of copy and pasting.
For example, take the following where I want to compare 3 models.
Code:
sysuse auto quietly regress mpg weight estimates store r_unadjusted quietly regress mpg weight displ estimates store r_adjust1 quietly regress mpg weight displ foreign estimates store r_adjust2
Code:
estimates table _all, keep(weight) se p
And I suppose in many situtions this would be fine, but what I am looking for is a way (if one exists) to include the confidence intervals in such a table that would make it easily shareable with my collaborators so I could show them the outputs of the various models without me having to copy and past each output into a word file.
For example something that would like this:
Coefficient | lower limit 95% CI | upper limit 95% CI | p-value | |
Model 1 unadjusted |
||||
Model 2 adjusted for age/sex |
||||
Model 3 adjusted for everything and the kitchen sink |
||||
If there is an easier solution to this problem, I would be greatly appreciative of any help.
Using Stata version 13 for Mac.
Sincerely,
Christopher Labos
0 Response to Create a table comparing output from diffrent regression models
Post a Comment