In this chapter, we address several additional topics that show off the statistical computing strengths and potential of SAS, as well as illustrate many of the entries in the earlier chapters.

It is often useful to be able to simulate data from a logistic regression (Section 5.1.1). Our approach is to generate the linear predictor, then apply the inverse link, and finally draw from a distribution with this parameter. This approach is useful in that it can easily be applied to other generalized linear models. In this example we assume an intercept of 0, a single continuous predictor with a slope of 0.5, and generate 1,000 observations. See Section 5.6.1 for an example of fitting logistic regression.