Graphical comparison of predicted probability and empirical values of outcome a > fter a binary response model
classplot [ , xcategories(integer) ycategories(integer) plotall twoway_options ]
Description
classplot draws a comparison of predicted probability and empirical values of outcome after a binary response model like logit or probit. It is an extension of estat classification. classplot provides a simple way to search for cut-off values.
Users may chose the number of vertical aligned symbols and the number of categories of predicted probability. It is possible to change twoway_options.
Remarks
The default graph plots all cases if the maximum number in a probability-category is smaller than 20. If the number exceeds 20 cases each symbol represents more than one case (e.g. no case will be omitted). In this case the maximum number is shown in a note. In fact the first and the last symbol of a probability category may represent 1 to max. no. cases, symbols in between represent definitively max. no. cases.
classplot may be computationally expensive (e.g. cases*xcat*ycat calculations are performed).
Options
xcategories(integer) Number of categories of predicted probability. xcat(integer) needs an integer from 2 to 100 as an argument (default 25).
ycategories(integer) Number of (vertical aligned) symbols in each category of predicted probability. xcat(integer) needs an integer from 1 to 100 as an argument (default 20).
plotall forces classplot to plot all cases as unique symbols. This option is not recommended with large (>100 cases) datasets, because one won't be able to disciminate plotsymbols. plotall overrides the ycat(#) option.
twoway_options refers to options of twoway.
Examples
Default usage:
. sysuse auto
. logit foreign price weight mpg
. classplot
To produce a "clean" plot with all cases:
. classplot , plotall legend(off) subtitle("") title("") xtitle("") ytitle("")
Compare two plots (100 vs. 1000 symbols):
. classplot, ycat(10) xcat(10) name(cp_10x10) noshow
. classplot, ycat(100) xcat(100) name(cp_100x100) noshow
. graph combine cp_10x10 cp_100x100 , rows(2)
Acknowledgements
Future versions of classplot may be byable accept if-statements and fweights if requested.
Author
Lars E. Kroll, email http://www.lkroll.de
Also see
On-line: help for graph_twoway, logit, probit, logit postestimation