Hello,
I am having some issues with my code for dtable. Been trying to insert parenthesis for interquartile range and a "-" betewen q1 and q3 eg. (q1-q3) but it does not seem to work.
Tried looking at the stata manual as well as this forum but have not come across a potential solution.
Here is my code:
dtable, by(pregcat, notests totals nomissing) define(meansd=mean sd, delimiter({±})) define(iqi= q1 q3, delimiter("-"))continuous(age_preg bmi , statistics(mean sd)) continuous(gravida para creat_prepreg egfr_prepreg , statistics(median q1 q3)) factor(site race renaldx cvs diabetes transplant smoke sle prepreg_antihypertensives immunosupp, statistics(fvfrequency fvpercent)) nformat(%9.2g mean sd frequency median q1 q3 fvfrequency fvpercent) title(Table 1. Demographic characteristics of participants) nformat(%6.0f p25 p75 median) sformat("(%s)" iqi) nformat(%6.1f mean sd) sformat("%s" meansd) column(by(hide) total(All))
Thank you very much
Jennifer
I am having some issues with my code for dtable. Been trying to insert parenthesis for interquartile range and a "-" betewen q1 and q3 eg. (q1-q3) but it does not seem to work.
Tried looking at the stata manual as well as this forum but have not come across a potential solution.
Here is my code:
dtable, by(pregcat, notests totals nomissing) define(meansd=mean sd, delimiter({±})) define(iqi= q1 q3, delimiter("-"))continuous(age_preg bmi , statistics(mean sd)) continuous(gravida para creat_prepreg egfr_prepreg , statistics(median q1 q3)) factor(site race renaldx cvs diabetes transplant smoke sle prepreg_antihypertensives immunosupp, statistics(fvfrequency fvpercent)) nformat(%9.2g mean sd frequency median q1 q3 fvfrequency fvpercent) title(Table 1. Demographic characteristics of participants) nformat(%6.0f p25 p75 median) sformat("(%s)" iqi) nformat(%6.1f mean sd) sformat("%s" meansd) column(by(hide) total(All))
Thank you very much
Jennifer
Comment