Hi I'm having trouble with a putdocx command
I would like to put on word a table like that :
macros:
r(name3) : "GS >=3+4"
r(name2) : "GS<=3+3"
r(name1) : "no biopsy"
matrices:
r(Stat3) : 8 x 6
r(Stat2) : 8 x 6
r(Stat1) : 8 x 6
r(StatTotal) : 8 x 6
Using
. tabstat psa trusprosvol fk_score ex_score likelihood_hg, by(GGtot_neg_gg1) statistics (count mean sd min p25 p50 p75 max) columns(statistics) save
I'm using the following codes:
"putdocx clear
putdocx begin
tabstat psa trusprosvol fk_score ex_score likelihood_hg, by(GGtot_neg_gg1) statistics (count mean sd min p25 p50 p75 max) columns(statistics) save
return list
matrix LabResults1 = r(StatTotal)'
matrix LabResults2 = r(stat3)
matrix LabResults3 = r(stat2)
matrix LabResults4 = r(stat1)
putdocx table Table1 = matrix(LabResults1) , rownames colnames
putdocx table Table2 = matrix (LabResults2)
putdocx table Table3 = matrix (LabResults3)
putdocx table Table4 = matrix (LabResults4)
putdocx save "table_stat1.docx", replace"
But I do not have only the fist table and then 3 empty cells.
Can you help me , please
I would like to put on word a table like that :
macros:
r(name3) : "GS >=3+4"
r(name2) : "GS<=3+3"
r(name1) : "no biopsy"
matrices:
r(Stat3) : 8 x 6
r(Stat2) : 8 x 6
r(Stat1) : 8 x 6
r(StatTotal) : 8 x 6
Using
. tabstat psa trusprosvol fk_score ex_score likelihood_hg, by(GGtot_neg_gg1) statistics (count mean sd min p25 p50 p75 max) columns(statistics) save
I'm using the following codes:
"putdocx clear
putdocx begin
tabstat psa trusprosvol fk_score ex_score likelihood_hg, by(GGtot_neg_gg1) statistics (count mean sd min p25 p50 p75 max) columns(statistics) save
return list
matrix LabResults1 = r(StatTotal)'
matrix LabResults2 = r(stat3)
matrix LabResults3 = r(stat2)
matrix LabResults4 = r(stat1)
putdocx table Table1 = matrix(LabResults1) , rownames colnames
putdocx table Table2 = matrix (LabResults2)
putdocx table Table3 = matrix (LabResults3)
putdocx table Table4 = matrix (LabResults4)
putdocx save "table_stat1.docx", replace"
But I do not have only the fist table and then 3 empty cells.
Can you help me , please
Comment