/*-----------------------------------------------------------------*/
/*                                                                 */
/*SAS Example II          Stat345         Categorical Data Analysis*/
/*                                                                 */
/*Mizzou Football Example                                          */
/*                                                                 */
/*-----------------------------------------------------------------*/

Options LS=78;

Data Mizzou;
  INPUT Year Win_Loss $ Freq @@;
  Cards;
  1995 Loss 8  1995 Win 3
  1996 Loss 6  1996 Win 5
  1997 Loss 5  1997 Win 7
  1998 Loss 4  1998 Win 8
  ;

/*Analyze the data using Proc FREQ.                                */
/*  The 'Order=Data' specification maintains the ordering of       */
/*          the variable levels in which the data was input.       */
/*  The 'Weight' statement identifies the cell frequency           */
/*          variable.                                              */
/*  The 'Measures' option produces estimates for various measures  */
/*          of association.                                        */
/*  The 'Title' statement assigns a heading to each page of output.*/

Proc FREQ Order = Data;
  Weight Freq;
  Tables Year*Win_Loss / Measures;
  Title 'Mizzou Football Example';
  Run;

Submit to see output