/*=========================*/ /* Common Procedure Steps */ /*=========================*/ /*This procedure step sorts the data by the specified variable*/ PROC SORT DATA=allnurse; BY RURAL BEDS; RUN; /*This procedure gives broad descriptions of PCREV and BEDS*/ PROC UNIVARIATE DATA=nursings; VAR PCREV BEDS; RUN; /*This procedure produces a split boxplot*/ PROC BOXPLOT DATA=allnurse; PLOT PCREV*RURAL; RUN; /*This procedure produces a scatterplot*/ PROC GPLOT DATA=allnurse; PLOT PCREV*BEDS; RUN; /*This procedure gives a tabular description of RURAL*/ PROC FREQ DATA=allnurse; TABLES RURAL; RUN; /*This procedure gives a two-way table of RURAL vs. PARNTERID*/ PROC FREQ DATA=allnurse; TABLES RURAL*PARTNERID; RUN; /*This procedure step finds the means of listed variables*/ PROC MEANS DATA=allnurse; VAR PCREV BEDS; RUN; /*This procedure step finds correlation between variables*/ PROC CORR DATA=allnurse; VAR BEDS MCDAYS TDAYS PCREV NSAL FEXP RURAL; RUN; /*This procedure step performs a regression of PCREV*/ PROC REG DATA=allnurse; MODEL PCREV = BEDS MCDAYS TDAYS RURAL; TITLE 'Regression on Patient Care Revenue'; OUTPUT out=regout p=yhat r=yresid; RUN; /*These procedures produce various diagnostic plots*/ PLOT PCREV*p.; RUN; PLOT r.*nqq.; RUN; PLOT r.*p.; RUN; PROC PRINT DATA=regout; RUN; /*This procedure produces a logistic regression of RURAL on BEDS and PCREV*/ PROC LOGISTIC DATA=allnurse; CLASS RURAL MODEL RURAL=BEDS PCREV; RUN;