0% found this document useful (0 votes)
52 views

Final Sas Projecr

Uploaded by

api-382579259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Final Sas Projecr

Uploaded by

api-382579259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

*

SAS Final Data Analysis Project


Program: SAS Final.sas
Modifiers: Taylor Ballantyne, Savannah Brown, Kayla Rodriguez, Jarvis Strickland
Original Source: Data provided by Dr. Jasper Xu
Purpose: To complete the requirement for the Final Data Analysis Project
Initial programming: 11/19/2020
Last modified: 12/2/2020
Notes: PHC6051, Fall 2020
*/

ods listing close;


libname desktop '\\xafile3\XenApp Profiles\n00975987\Documents\Final sas';
proc import datafile ='\\xafile3\XenApp Profiles\n00975987\Documents\Final
sas\AHA2011.xlsx'
out= AHA
dbms=xlsx
replace;
sheet="final";
getnames=yes;
Run;
data desktop.AHA;
if systemID = . then system = 0;
Else system = 1;
Alos = Inpatientdays/admissions;
MCR = TotalMedicaredays/InpatientDays;
MCD = TotalMedicaiddays/InpatientDays;
set AHA;
Proc sort data = desktop.AHA OUT = AHA2011_Ny;
where State="New York";
By AHAID;
Run;

Proc means data = AHA2011_Ny MAXDEC = 2;


Run;

Proc SGPLOT Data = AHA2011_Ny;


Histogram Pct_recommend;
title 'Histogram of PCT Recommend';
Run;
Proc SGPlot data = AHA2011_Ny;
Scatter X = Pct_recommend Y = Alos / Group = Hospitalsize;
title 'Scatterplot of PCT Recommend';
Run;

/*PART D*/

proc freq data = AHA2011_NY;


table teaching * (system For_profit)/CHISQ RELRISK PLOTS = FREQPLOT;
weight teaching;
run;
/* Part D. a): Odds Ratio is 1.2000 for the teaching status and system. With that being said,
there is an association.
Part D. b): There is an association between teaching status and being a for profit hospital.*/

/*Part E*/

proc corr data = AHA2011_NY PLOTS =(SCATTER MATRIX);


var pct_recommend totalhospitalbeds ALOS MCR MCD CriticalAccess
non_for_profit for_profit MajorTeach MinorTeach System;
title 'Correlations of Variables';
run;

/*The pairs of variables with significant correlations are: Pct_Recommend and MCR;
Pct_Recommend and MCD; Pct_Recommend and CriticalAccess; Pct_Recommend and
System; Totalhospitalbeds and ALOS
Totalhospitalbeds and MCR; Totalhospitalbeds and MCD; Totalhospitalbeds and CriticalAccess;
Totalhospitalbeds and Non_for_profit; 
Totalhospitalbeds and MajorTeach; ALOS and MCR; ALOS and MCD; ALOS and
Non_for_profit; MCR and MCD; MCR and Non_for_profit; MCR and MajorTeach; 
MCD and Non_for_profit; MCD and MajorTeach; CriticalAccess and MinorTeach; Non_for_profit
and MajorTeach; MajorTeach and MinorTeach; MajorTeach and System; */

/*Part F*/

proc reg data = AHA2011_NY;


model pct_recommend = Totalhospitalbeds;
Title 'Results of Regression analysis pct_recommend by totalhospitalbeds';
Run;

proc reg data = AHA2011_NY;


model pct_recommend = CriticalAccess
Title 'Results of Regression analysis pct_recommend by Criticalaccess';
Run;

proc reg data = AHA2011_NY;


model pct_recommend = Non_for_profit For_profit
Title 'Results of Regression analysis pct_recommend by Non_for_Profit &
For_Profit';
Run;

proc reg data = AHA2011_NY;


model pct_recommend =MajorTeach MinorTeach;
Title 'Results of Regression analysis pct_recommend by MajorTeach & Minor
Teach';
Run;
proc reg data = AHA2011_NY;
model pct_recommend = System;
Title 'Results of Regression analysis pct_recommend by System';
Run;

proc reg data = AHA2011_NY;


model pct_recommend = ALOS;
Title 'Results of Regression analysis pct_recommend by ALOS';
Run;

proc reg data = AHA2011_NY;


model pct_recommend =MCR;
Title 'Results of Regression analysis pct_recommend by MCR';
Run;

proc reg data = AHA2011_NY;


model pct_recommend = MCD;
Title 'Results of Regression analysis pct_recommend by MCD';
Run;

ods pdf close;

You might also like