Previous: Density Plots: A Histogram Up: Examples Next: Advanced Zelig Uses

Advanced Examples

The examples above are simple examples which only skim the surface of R's plotting potential. We include more advanced, model-specific plots in the Zelig demo scripts, and have created functions that automate some of these plots, including:

  1. Ternary Diagrams describe the predicted probability of a categorical dependent variable that has three observed outcomes. You may choose to use this plot with the multinomial logit, the ordinal logit, or the ordinal probit models (Katz and King, 1999). See Section [*] for the sample code, type demo(mlogit) at the R prompt to run the example, and refer to Section [*] to add points to a ternary diagram.

    41#41

  2. ROC Plots summarize how well models for binary dependent variables (logit, probit, and relogit) fit the data. The ROC plot evaluates the fraction of 0's and 1's correctly predicted for every possible threshold value at which the continuous Prob42#42 may be realized as a dichotomous prediction. The closer the ROC curve is to the upper right corner of the plot, the better the fit of the model specification (King and Zeng, 2002b). See Section [*] for the sample code, and type demo(roc) at the R prompt to run the example.

    43#43

  3. Vertical Confidence Intervals may be used for almost any model, and describe simulated confidence intervals for any quantity of interest while allowing one of the explanatory variables to vary over a given range of values (King, Tomz and Wittenberg, 2000). Type demo(vertci) at the R prompt to run the example, and help.zelig(plot.ci) for the manual page.

    44#44



Gary King 2011-11-29