Hello,
I would like to have a table that includes only one column, but is reporting results from two models. I would think that the following command should work, however, the predictors that are shared between the two regressions do not show in the table:
This results in:
Although I understand that I can use the following code with two separate models, one for each regression, however, this would result in a table with two columns:
Which results in:
I understand that the covariates result in different coefficients and confidence intervals pending on the models, however, with the actual data I am using (I am not using nhanes2l data), the coefficients/CI's are exactly the same in the two models that I want to include in one column.
How can I make a table that includes the coefficient/CI's for hematocrit in the first table, that contains the results for model 1?
Thank you in advance!
I would like to have a table that includes only one column, but is reporting results from two models. I would think that the following command should work, however, the predictors that are shared between the two regressions do not show in the table:
Code:
webuse nhanes2l, clear collect clear collect _r_b _r_ci, tag(model[combined_results]): regress bpsystol hgb i.race i.rural collect _r_b _r_ci, tag(model[combined_results): regress bpsystol hct i.race i.rural collect layout (colname[hgb hct 1.race 2.race 3.race 0.rural 1.rural]#result) (model)
Code:
. collect layout (colname[hgb hct 1.race 2.race 3.race 0.rural 1.rural]#result) (model) Collection: default Rows: colname[hgb hct 1.race 2.race 3.race 0.rural 1.rural]#result Columns: model Table 1: 6 x 1 -------------------------------------- | combined_results ------------------+------------------- Hemoglobin (g/dL) | Coefficient | 1.714797 95% CI | 1.384949 2.044645 Hematocrit (%) | Coefficient | .6554286 95% CI | .5325924 .7782647 --------------------------------------
Code:
webuse nhanes2l, clear collect clear collect _r_b _r_ci, tag(model[model_1]): regress bpsystol hgb i.race i.rural collect _r_b _r_ci, tag(model[model_2]): regress bpsystol hct i.race i.rural collect layout (colname[hgb hct 1.race 2.race 3.race 0.rural 1.rural]#result) (model)
Code:
. collect layout (colname[hgb hct 1.race 2.race 3.race 0.rural 1.rural]#result) (model) Collection: default Rows: colname[hgb hct 1.race 2.race 3.race 0.rural 1.rural]#result Columns: model Table 1: 19 x 2 ----------------------------------------------------------- | model_1 model_2 ------------------+---------------------------------------- Hemoglobin (g/dL) | Coefficient | 1.714797 95% CI | 1.384949 2.044645 Hematocrit (%) | Coefficient | .6554286 95% CI | .5325924 .7782647 White | Coefficient | 0 0 Black | Coefficient | 5.155836 4.643728 95% CI | 3.642232 6.669441 3.146876 6.14058 Other | Coefficient | -1.63656 -1.674051 95% CI | -4.891694 1.618573 -4.928377 1.580275 Urban | Coefficient | 0 0 Rural | Coefficient | 1.331342 1.325153 95% CI | .3859748 2.276709 .3800328 2.270272 -----------------------------------------------------------
How can I make a table that includes the coefficient/CI's for hematocrit in the first table, that contains the results for model 1?
Thank you in advance!
Comment