Good morning,

I am working to create some funnel charts using the funnelcompar command. Funnelcompar is user written by Silvia Forni and Rosa Gini.


The current code I am experimenting with is:
Code:
funnelcompar prop_under tot_chd siteid, noweight binomial xtitle("Site sample size") ytitle(Underweight Proportion) markcond(siteid ==1) colormarkcond(white) markcond(siteid ==2) colormarkcond(red)
I am curious if there is a way to specify with a shorter/simpler command to have all siteid variables to be marked on my plot and a unique color assigned to each one. My current strategy is to specify each individual site with markcond and colormarkcond. This will get arduous quickly and this is my first time using funnel charts with the funnelcompar command.

I am also attempting to standardize the y-axis range to be (-1, 1). I am attempting to use yscale(r(-1 1)) within funnelcompar, but I am getting an error I can't get past- option yscale() not allowed. I am able to go in to the graph editor and manually change the Y axis rule with a custom range and delta, but wondering how to accomplish this within code to apply to a large number of graphs being produced.
Code:
funnelcompar prop_under tot_chd siteid, noweight binomial xtitle("Site sample size") ytitle(Underweight Proportion) yscale(r(-1 1))

Example Data:

Code:
clear
input byte(siteid freq_underweight0 freq_underweight1) float(tot_chd prop_under)
 1 33 29 62  .4677419
 2  3  3  6        .5
 3  5  5 10        .5
 4  5 10 15  .6666667
 5 54 27 81  .3333333
 6 38 34 72  .4722222
 8 59 26 85  .3058824
10 14  5 19  .2631579
11  9  3 12       .25
12 10  4 14  .2857143
13  0  3  3         1
15  1  4  5        .8
16  4 18 22  .8181818
17  1  2  3  .6666667
18 11  5 16     .3125
19  1  4  5        .8
20  1  2  3  .6666667
22 20  5 25        .2
23  5  6 11 .54545456
26  0  1  1         1
28  7  6 13  .4615385
32  0  1  1         1
35  1  5  6  .8333333
37  0  3  3         1
39  4 11 15  .7333333
end