'95% CI of weighted proportions "in row" and not in column

I need your help. I work with the survey package on weighted data. I would like to have the confidence intervals of my proportions "in line" and not in column.

Here is my code with confint that gives me the 95% confidence intervals of the columnar proportions :

tab0a <- svyby(~sexe_enf, ~probleme_sante_mentale, design, svymean, na.rm=TRUE, vartype = "ci")
tab0a
tab0b <- svytable(~sexe_enf+probleme_sante_mentale, design)
lprop(tab0b)
confint(tab0a)

tab0c <- paste("[", round(confint(svyby(~sexe_enf, ~probleme_sante_mentale, design, svymean, na.rm=TRUE))[,1],3)*100," ; ",
               round(confint(svyby(~sexe_enf, ~probleme_sante_mentale, design, svymean, na.rm=TRUE))[,2],3)*100, "]", sep="")
tab0c

I don't know what I need to change or add to get it to give me the 95% CIs of the percentages in line from lprop.

Thanks a lot for your help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source