Reference no: EM132302792
DATA ANALYSIS ASSIGNMENT 1: Analysis of Heart Data Set
This assignment uses a data set that is included as part of the SAS software for training purposes. For this assignment, you will demonstrate that you can use the SAS OnDemand Web Editor to:
- open a data set
- print out information on the format of the data
- compute basic descriptive statistics, graphs, and tables
NOTE: Before you complete this assignment you must sign up for SAS On-Demand for Academics for the course COH 602 offered at National University. A letter with a link on how to do this is posted on the course website.
1. Go to the SAS OnDemand for Academics website and log in to your account.
2. In your SAS OnDemand profile page, click on "Run Client," and the Web Editor should open.
3. In the left window of the Web Editor, you will see "Libraries," click on this to expand it (by clicking the + sign)
4. Scroll down until you see the Library named "SASHELP" and continue scrolling down until you see the dataset named "HEART" and double-click on it.
- A Table View of the data set will open. This just lets you see what the data set looks like, which will make the next exercise make more sense for you
- If you click on the dropdown arrow for the HEART dataset, you will be able to see all the variables in the dataset within the Libraries window. This will help you when writing your code.
5. In the right window, click on the tab that says "Code". This will bring up a blank screen.
6. Type PROC CONTENTS DATA = SASHELP.HEART; RUN;
- NOTE: Do not forget the semi-colons after "HEART" and "RUN"!! The procedure will not run without it.
7. Click on the icon at the top that looks like a running man.
- Congratulations! You have now produced your first output.
8. You are now going to produce some frequency distributions. Select three of the variables in the HEART dataset (do not select ID as one of these). At least two of the variables must be numeric. You know the variable names and whether they are numeric by looking at the output from your PROC CONTENTS. A frequency table will give you every data point that is contained within a variable. Type the following in your code window:
PROC FREQ DATA = SASHELP.HEART;
TABLES variable1 variable2 variable3;
RUN;
(Type the names of the variables you have chosen instead of variable1 etc.)
9. For the variables you selected under in step 8 create vertical bar charts to give you a graphical representation of the data values you produced in the frequency table:
PROC CHART DATA = SASHELP.HEART;
VBAR variable1 variable2 variable3;
RUN;
(Type the names of the variables you have chosen instead of variable1 etc.)
10. For the numeric variables only that you selected in step 8 compute descriptive statistics that will give you a clearer picture about your sample population, for each variable. Try both SAS codes below to see the differences in results they produce.
PROC UNIVARIATE DATA = SASHELP.HEART;
VAR variable1 variable2 variable3;
HISTOGRAM / NORMAL;
RUN;
OR YOU CAN USE
PROC MEANS DATA = SASHELP.HEART MEAN STD MEDIAN MODE;
VAR variable1 variable2 variable3;
RUN;
11. Write a one page summary of your analysis in which you discuss the results of the statistical procedures you ran in SAS. Report the mean, standard deviation, median, and mode for each numeric variable, and report the count and percentage of each category (or level) for each categorical variable. Interpret what these values tell you about the sample population of people you are studying, based upon these variables. Using the histogram from PROC UNIVARIATE, as well as the mean and median values you produced, explain if the each numeric variable is positively skewed, negatively skewed, or symmetric. For every statement you make about a variable, in your interpretation, make sure to support that statement with evidence from the descriptive statistics you have produced.
DATA ANALYSIS ASSIGNMENT 2: Analysis of Heart Data Set
This assignment uses a data set that is included as part of the SAS software for training purposes. For this assignment, you will demonstrate that you can use the SAS OnDemand Web Editor to:
- open a data set
- print out information on the format of the data
- compute basic descriptive statistics, graphs, and tables
NOTE: Before you complete this assignment you must sign up for SAS On-Demand for Academics for the course COH 602 offered at National University. A letter with a link on how to do this is posted on the course website.
NOTE: The codes shown below are examples. Replace "height" and "weight" with the variables you choose and everything should run correctly. Do not select the same pair of variables.
1. Go to the SAS OnDemand for Academics website and log in to your account.
2. In your SAS OnDemand profile page, click on "Run Client," and the Web Editor should open.
3. Select 2 numeric variables of interest from the HEART data set. In your previous assignment, you did a PROC CONTENTS that listed the variable names and types. OR, you could click on "Libraries" and then double-click on "HEART" to open the data set and look at it.
4. Compute descriptive statistics by using PROC UNIVARIATE as follows:
PROC UNIVARIATE DATA = sashelp.heart;
VAR height weight;
RUN;
5. Create a histogram of the data for both variables
PROC SGPLOT DATA = sashelp.heart;
HISTOGRAM height;
RUN;
PROC SGPLOT DATA = sashelp.heart;
HISTOGRAM weight;
RUN;
6. Sort your data by sex and output a new temporary dataset (SAS will not output any results for this step; the data is simply being sorted internally).
PROC SORT DATA = sashelp.heart OUT = temp;
BY sex;
RUN;
7. Run the univariate procedure again for the new temporary dataset SAS has outputted.
PROC UNIVARIATE DATA = temp;
VAR height weight;
BY sex;
RUN;
8. Run the SGPLOT procedure again for the new temporary dataset SAS has outputted.
PROC SGPLOT DATA = temp;
HISTOGRAM height;
BY sex;
RUN;
PROC SGPLOT DATA = temp;
HISTOGRAM weight;
BY sex;
RUN;
9. Write a one page summary of your analysis in which you discuss the results of the statistical procedures you ran in SAS. Report the mean, standard deviation, median, and mode for each numeric variable. Interpret what these values tell you about the sample population of people you are studying, based upon these variables. Using the histograms from PROC SGPLOT, as well as the mean and median values you produced, explain if the each variable is positively skewed, negatively skewed, or symmetric. Lastly, did sorting the data by sex change these descriptive statistic results and histograms for your two variables? For every statement you make about a variable, in your interpretation, make sure to support that statement with evidence from the descriptive statistics you have produced.
Attachment:- Assignment Files.rar