proptest(x[,y],null:val,[upper:T or lower:T,contcor:T|F,pool:T|F]) proptest(s1,n1[,s2,n2],null:val,[upper:T or lower:T,contcor:T|F,pool:T|F]) |
proptest() performs a one- or two-sample z-test for proportions, depending on whether data for one or two variables are given as arguments. Arguments may be either vectors of 0/1 data, or may be counts of successes and numbers of trials. By default there is a two-tailed alternative, but you may choose one-sided alternatives by using one of lowertail:T or uppertail:T. You specify the null value via null:value. For a two-sample test, only null:0 is allowed. Use of contcor:T will cause the p-value to be calculated with a continuity correction. For a two-sample test, you may specify that the variances be pooled or unpooled via pool:T or pool:F. The output is a vector containing the z-statistic and the p-value.