Hi, I'm new to using stata (using Stata17), I'm currently trying to replicate this graph. I've successfully created most of the columns except for the P value column. The authors used Chi2 analysis to determine the Pvalue included. I just need to similarly perform a chi2 test of association between demographic factors and CM use and include it in the table. Is it possible to perform with code from a do file editor or do I have to enter it manually by hand following a tabulate of gender with CM use. CM use is coded as a binary 1 or 0 but only the 1 (yes) variable is being graphed here. Please let me know if there's anything additional I can provide to answer this question.

Array