Dear All,
I write because I would like to have an advice on how to modify a stata do-file:
I am running a multivariable linear regression analysis using normalized variables because part of the outcome variables were log-transformed to ensure normal distribution.
Now, since both the dependent and the independent variables in the model are normalized, the beta coefficients of the regression models will be expressed as SD increases in the outcome variables for each 1 SD increase of the independent variable.
Since this might be difficult to interpret, I would like to show it differently, by multiplying each beta for the SD of its corresponding outcome variable. Then I would have something like this: absolute increase (in the unit of measurements, 0say mg/dL) in the outcome variable for each 1 SD increase in the independent variable.
This is my original code I used for the looped regressions:
"foreach x in ZCa_mmol_per_l_B Zca_plasma_ran_1_corrctd_fr_lbmn ZCa_ionised_mmol_per_l_B ZPi_mmol_per_l_B Zsqrt_X125VitD_pmol_per_l_B Zlog_PTH_ran_1_ng_per_l_B Zsqrt_Ca_native_ran_1_mmol_Smp_U Zsqrt_feCa_native_ran_1_U Zsqrt_Pi_native_ran_1_mmol_Smp_U Zsqrt_fePi_native_ran_1_U Zsqrt_LWS_BMD Zsqrt_Schenkelhals_BMD {
eststo: regress `x' ZRatio_25_2425_CYP24A1_Day_1 ZAge_V2 Sex_n ZBMI ZeGFR_CKD_EPI_crea_ran_recalc ZVitD25_ng_ml_Day1 ZNa_native_ran_1_mmol_Smp_U
}
esttab using multi_reg_revision.xls, cells(b(fmt(3)) ci(fmt(3) par) p(fmt(3) par)) keep(ZRatio_25_2425_CYP24A1_Day_1) replace ///
nogaps nolines collabels(none)"
How can I do what I explained above automatically, to export directly the modified betas and 95% CI?
Thank you a lot in advance!
I write because I would like to have an advice on how to modify a stata do-file:
I am running a multivariable linear regression analysis using normalized variables because part of the outcome variables were log-transformed to ensure normal distribution.
Now, since both the dependent and the independent variables in the model are normalized, the beta coefficients of the regression models will be expressed as SD increases in the outcome variables for each 1 SD increase of the independent variable.
Since this might be difficult to interpret, I would like to show it differently, by multiplying each beta for the SD of its corresponding outcome variable. Then I would have something like this: absolute increase (in the unit of measurements, 0say mg/dL) in the outcome variable for each 1 SD increase in the independent variable.
This is my original code I used for the looped regressions:
"foreach x in ZCa_mmol_per_l_B Zca_plasma_ran_1_corrctd_fr_lbmn ZCa_ionised_mmol_per_l_B ZPi_mmol_per_l_B Zsqrt_X125VitD_pmol_per_l_B Zlog_PTH_ran_1_ng_per_l_B Zsqrt_Ca_native_ran_1_mmol_Smp_U Zsqrt_feCa_native_ran_1_U Zsqrt_Pi_native_ran_1_mmol_Smp_U Zsqrt_fePi_native_ran_1_U Zsqrt_LWS_BMD Zsqrt_Schenkelhals_BMD {
eststo: regress `x' ZRatio_25_2425_CYP24A1_Day_1 ZAge_V2 Sex_n ZBMI ZeGFR_CKD_EPI_crea_ran_recalc ZVitD25_ng_ml_Day1 ZNa_native_ran_1_mmol_Smp_U
}
esttab using multi_reg_revision.xls, cells(b(fmt(3)) ci(fmt(3) par) p(fmt(3) par)) keep(ZRatio_25_2425_CYP24A1_Day_1) replace ///
nogaps nolines collabels(none)"
How can I do what I explained above automatically, to export directly the modified betas and 95% CI?
Thank you a lot in advance!
Comment