Hello all: I wanted to get the median, and IQR numbers to show only 1 decimal but I am seeing 10. Also, I wanted the leading zeros in the Cox p-values. Any idea how I could use the nformat to make the changes. I tried a bit after reading the help but am unable to.
I have not done -dataex- but I can if it would be useful to others.
cx save putdocx_file, replace
I have not done -dataex- but I can if it would be useful to others.
Code:
*1 Clear putdocx file from memory, if any. putdocx clear *3 Start the putdocx file putdocx begin *4 Some putdocx commands putdocx paragraph qui count putdocx text ("The median number of patients in study is `r(N)'") summ agedx, detail putdocx text (" with a median age of `r(p50)' (IQR: `r(p25)', `r(p75)').") local x anymis stcox ib0.`x' ib0.age70 matrix list r(table) scalar b = round(r(table)[1,2], 0.01) local b = scalar(b) scalar l = round(r(table)[5,2], 0.01) local l = scalar(l) scalar u = round(r(table)[6,2], 0.01) local u = scalar(u) putdocx text ( " Missense mutations were associated with favorable outcome (HR:`b', 95% CI: `l', `u').") *5 Save the putdocx contents to a file, call it putdocxfil putdo