Dear Esteemed Members,
I am working with a survey dataset to assess the factors associated with youth having a high viral load. I am in the process of creating Table 1 – descriptive statistics – using the dtable command. Below is the code I have used thus far. However, I would like to obtain row percentages instead of column percentages for the unsuppressed viral load binary variable (vlns) coded (Yes/No).
Does anyone know how to adjust the syntax to produce row percentages?
Thank you in advance for your assistance.
dtable, by(vlns) svy ///
factor(b08sex agecat evermarried educat2 wealth employ audit8all p69art morethan1_partner trsexall incondomuse sti arm p66mtctdte bmicat p612cart, statistics( fvrawfrequency fvpercent)) ///
sample(, stat(frequency percent)) ///
nformat(%9.1f fvpercent) ///
sformat(`"(%s%%)"' fvpercent) ///
title(Table 1: sociodemographic characteristics of participants by viral load non-suppression) ///
titlestyles( font(, bold)) ///
export("$Tabledir/Table1", as(docx) replace)
I am working with a survey dataset to assess the factors associated with youth having a high viral load. I am in the process of creating Table 1 – descriptive statistics – using the dtable command. Below is the code I have used thus far. However, I would like to obtain row percentages instead of column percentages for the unsuppressed viral load binary variable (vlns) coded (Yes/No).
Does anyone know how to adjust the syntax to produce row percentages?
Thank you in advance for your assistance.
dtable, by(vlns) svy ///
factor(b08sex agecat evermarried educat2 wealth employ audit8all p69art morethan1_partner trsexall incondomuse sti arm p66mtctdte bmicat p612cart, statistics( fvrawfrequency fvpercent)) ///
sample(, stat(frequency percent)) ///
nformat(%9.1f fvpercent) ///
sformat(`"(%s%%)"' fvpercent) ///
title(Table 1: sociodemographic characteristics of participants by viral load non-suppression) ///
titlestyles( font(, bold)) ///
export("$Tabledir/Table1", as(docx) replace)

Comment