Data Management and Visualization – Creating graphs

SAS Program

Research Question: Is lower income associated with worse health from a global perspective?

Please click here for my codebook.

Please click here for the entire SAS program. (Please click the following images for larger images)

1. Assign label names for variables and set unknown values to missing values
Wk4 SAS Code HW Screen 1

2. Create secondary variable and groups for the variablesWk4 SAS Code HW Screen 2

Wk4 SAS Code HW Screen 3

3. Set range of values and interpret responses for tablesWk4 SAS Code HW Screen 4

Wk4 SAS Code HW Screen 5

Wk4 SAS Code HW Screen 6

Wk4 SAS Code HW Screen 7

Wk4 SAS Code HW Screen 8

Wk4 SAS Code HW Screen 9

Wk4 SAS Code HW Screen 10

4. Create univariate and bivariate bar chartsWk4 SAS Code HW Screen 11

Univariate and Bivariate Bar Charts

Please click here for all bar charts.

The above univariate graph of the income per person by countries is unimodal, with its highest peak at US$6,000 which is the mid-point of the interval between US$0 and US$12,000. It is skewed to the right as there are higher frequencies in the lower income ranges.

Wk4 SAS Bar Chart Alcohol Consumption

The above univariate graph of the estimated average alcohol consumption per capita in liters is unimodal, with its highest peak at 5.0 liters. It is skewed to the right as there are higher frequencies in the lower alcohol consumption.

Wk4 SAS Bar Chart Breast Cancer

The above univariate graph of the numbers of breast cancer new case in 100,000 females is trimodal, with its highest peak at 18 cases. The other peaks are at 54 cases and 90 cases. It is skewed to the right as there are higher frequencies in the lower numbers of breast cancer new case.

Wk4 SAS Bar Chart HIVrate

The above univariate graph of the HIV rate is unimodal, with its highest peak at 1.5% which is the mid-point of the interval between 0% and 3%. It is skewed to the right as there are higher frequencies in the lower HIV rate.

Wk4 SAS Bar Chart Life Expectancy

The above univariate graph of the life expectancy is bimodal, with its highest peak at 76 years old which is the mid-point of the interval between 74 and 78 years old. The other peak is at 56 years old which is the mid-point of the internal between 54 and 58 years old. It is skewed to the left as there are higher frequencies at older ages.

Wk4 SAS Bar Chart Suicide Number

The above univariate graph of the numbers of suicide in 100,000 people is unimodal, with its highest peak at 6 cases which is the mid-point of the interval between 4 and 8 cases. It is skewed to the right as there are higher frequencies at lower numbers of case.

Wk4 SAS Bar Chart Income vs Alcohol Consumption

* The bar chart above shows income per person by country to the country’s alcohol consumption Per Capita. There is a positive relationship between the two variables. An increase in income is associated with an increase in alcohol consumption.

* Income group:
Interval 1: US$0 – US$559 (Lowest 20%)
Interval 2: US$560 – US$1,845 (21%-40%)
Interval 3: US$1,846 – US$4,700 (41%-60%)
Interval 4: US$4,701 – US$13,578 (61%-80%)
Interval 5: US$13,579 – US$105,148 (81%-100%/Highest 20%)

Wk4 SAS Bar Chart Income vs Breast Cancer

* The bar chart above shows income per person by country to the country’s breast cancer new cases. There is a positive relationship between the two variables. An increase in income is associated with an increase in numbers of the new breast cancer case.

Wk4 SAS Bar Chart Income vs HIVrate

* The bar chart above shows income per person by country to the country’s HIV rate. The chart does not show a clear relationship between the two variables because it is bimodal. However, the two intervals with the highest income (Interval 4 US$4,701-US$13,578 and Interval 5 US$13,579-US$105,148) have lower HIV rates.

Wk4 SAS Bar Chart Income vs Life Expectancy

* The bar chart above shows income per person by country to the country’s life expectancy. There is a positive relationship between the two variables. An increase in income is associated with an increase in years of age.

Wk4 SAS Bar Chart Income vs Suicide Number

* The bar chart above shows income per person by country to the country’s numbers of suicide case. The suicide numbers are examined because these reflect mental health levels. The chart does not show a clear relationship between the two variables.