/*------------------------------------------------------------*/
/* */
/*SAS Example V Stat345 Categorical Data Analysis*/
/* */
/*Pressure Load /Aircraft Fastener Study */
/* */
/*------------------------------------------------------------*/
Options LS=78;
Data Aircraft;
INPUT PSI Failures Total;
Cards;
2500 10 50
2700 17 70
2900 30 100
3100 21 60
3300 18 40
3500 43 85
3700 54 90
3900 33 50
4100 60 80
4300 51 65
;
/*Analyze the data using Proc LOGISTIC. */
/* The 'CTable' optin produces a classification table. */
/* 'PProb=' is used to set the probability level(s) for */
/* the classification of an event based on the predicted*/
/* probability. (If this specification is not used, a */
/* sequence of probability levels are considered, and */
/* a classification table is produced for each level.) */
/* 'PEvent=' is used to set the prevalence for the event */
/* in applications where the number os event cases and */
/* non-event cases are predetermined (e.g., case control*/
/* sudies). (If this specification is not used, the */
/* prevalence for the event is estimated as the */
/* proportion of event cases in the data set.) */
/* The 'Title' statement assigns a heading to each page of */
/* output. */
Proc LOGISTIC;
/* Model log (p(yi=1)/p(yi=0))= a + b * xi; */
/* yi=1 if ith fastener fails, 0 otherwise; */
/* xi=PSI applied to ith fastener */
MODEL Failures / Total =PSI
/CTable PProb = (.50, .40, .60);
Title 'Pressure Load /Aircraft Fastener Study';
Run;