Friday, 2 October 2015

Ch 17 - Counting Frequencies

Chapter 17(Counting Frequencies)


In this chapter I will learn how to generate frequency table with the help proc freq. Proc freq use for both character as well as numeric variable in one-way, two-way, and three-way. I can also use proc freq to create output data stes containing counts and percentage. We can also measure various statistics such as chi-square, odds ratio and relative risk 

Chapter#17 and Problem#1

Using the SAS data set Blood, generate one-way frequencies for the variables

Gender, BloodType, and AgeGroup. Use the appropriate options to omit the
cumulative statistics and percentages.

Solution:



Result:

Learning:
1# In this problem I have learnt how to generate frequency table 
2# I have used tables statement for compute frequency every variable in dataset
3# I have used nocum and noperecent that indicates that i do not want cumulative frequency as well as percentage.

Chapter#17 and Problem #3

Using the data set Blood, produce frequencies for the variable Chol (cholesterol).
Use a format to group the frequencies into three groups: low to 200 (normal), 201
and higher (high), and missing. Run PROC FREQ twice, once using the MISSING
option, and once without. Compare the percentages in both listings.

Solution:
Result:

Learning:
1# In this problem, I have proc format for formatting for labelling the output. it improves the appearance of the report when we used a format to label these values. 
2# proc freq used because I want to compute frequencies on formatted values, we can also use format to group values together into larger categories.


No comments:

Post a Comment