/* NOTES To run violin plots, you will need to install the violin package if you don't already have it. use the following command:o create violin plots ssc install violin According to Felipe Botero, who supplied this code, "this is an old module with limited capabilities that does not allow to fully customize the plots. Furthermore, it uses a low-level gph command that is not supported in Stata's release 2 .gph format. This implies that the files are saved in a format that does not allow them to be combined with other graphs. */ * Top panel use kaplan_binary, clear label variable year "2000 Year (65)" label variable year02 "2002 Year (65)" label variable issueowned "Issue Owned (43)" label variable consensualissue "Consensual Issue (43)" * The delimit command resets the character that marks the end of a command #delimit ; graph dot (asis) issueowned year year02 consensualissue, ascategory scheme(s1mono) t1("Means of Binary Variables") ndots(0); #delimit cr graph save "kaplan_binary.gph", replace * Middle panel use kaplan_violin, clear label variable cqnum "Competitiveness (65)" label variable nspendcap "Total Spending/Capita (65)" label variable ndifspendcap "Difference Spending/Capita(65)" label variable npercneg "Percent\nNegative Ads (65)" label variable lnpop "State Voting Age Pop. (ln) (65)" label variable yr00 "2000 Year (65)" label variable yr02 "2002 Year (65)" label variable nsalnc "Issue Salience (43)" label variable convf "Issue Convergence (982)" violin npercneg convf nsalnc , ylabel(0(25)100) t1("Percentage Variables") graph save "kaplan_violin_percentage.gph", replace * Bottom panel violin nspendcap cqnum ndifspendcap lnpop, ylabel(0(2)14) t1("Variables Measured in Millions") graph save "kaplan_violin_millions.gph", replace