Hi, I need to create a document with multiple tables tables univariate regression. I am using the putdocx table commands and a macro to loop the variables in the univariate regression. However, unable to get anything more than the first variable in the macro in the document. Please can someone help? thanks
forvalues i=1(1)4{
*putdocx begin
foreach var of varlist V01AGE BMI height weight{
putdocx paragraph, style(Heading1)
putdocx text ("`var' "), bold
clogit case `var', group(pairid3 ) vce(robust) or cformat(%9.3f) pformat(%5.3f) sformat(%8.3f)
estimates store demos`i'
putdocx table demos`i' = etable, title ("Conditional Logistic Regression of Symptomatic radiographic KOA `var'")
putdocx describe demos`i'
putdocx save CsCtrl_output.docx, append
}
}
forvalues i=1(1)4{
*putdocx begin
foreach var of varlist V01AGE BMI height weight{
putdocx paragraph, style(Heading1)
putdocx text ("`var' "), bold
clogit case `var', group(pairid3 ) vce(robust) or cformat(%9.3f) pformat(%5.3f) sformat(%8.3f)
estimates store demos`i'
putdocx table demos`i' = etable, title ("Conditional Logistic Regression of Symptomatic radiographic KOA `var'")
putdocx describe demos`i'
putdocx save CsCtrl_output.docx, append
}
}
Comment