Portfolio Project: SAS Analysis of Health Data - MEPS Dataset
VerifiedAdded on 2022/08/11
|6
|553
|20
Project
AI Summary
This portfolio project analyzes the mental and physical health scores of participants using SAS. The analysis incorporates summary statistics and t-tests to assess differences in health scores between males and females. The project utilizes the MEPS dataset and includes SAS code for data import, des...

The analysis has incorporated 2 main statistical procedures, which include the summary
statistics and t-test for two samples. Thus, the variable of interest for the study included the
mental and physical health scores of the participants (PCS42 and MSC42). Notably, to perform
the above procedures 4 codes were utilized, which include
/* Load FYC file */
FILENAME h192 "C:\MEPS\h192.ssp";
proc xcopy in = h192 out = WORK IMPORT;
run;
The above code is essential in importing or loading the data set into the sas program.
Summary Statistics
/* Calculating the summary statistics*/
proc means data=WORK.H192 chartype mean std min max n vardef=df;
var PCS42 MCS42 SEX;
run;
Consequently, to generate the descriptive or summary statistics the above code was used.
Notably, among the various descriptive statistics measures, mean, standard deviation, minimum,
and maximum were computed.
T-test.
Moreover, the analysis seeks to assess if there was a difference in mean mental and
physical health for male and female. SEX variable represents the gender whereby 1 represent
Female whereas 2 represents Male.
Physical health
statistics and t-test for two samples. Thus, the variable of interest for the study included the
mental and physical health scores of the participants (PCS42 and MSC42). Notably, to perform
the above procedures 4 codes were utilized, which include
/* Load FYC file */
FILENAME h192 "C:\MEPS\h192.ssp";
proc xcopy in = h192 out = WORK IMPORT;
run;
The above code is essential in importing or loading the data set into the sas program.
Summary Statistics
/* Calculating the summary statistics*/
proc means data=WORK.H192 chartype mean std min max n vardef=df;
var PCS42 MCS42 SEX;
run;
Consequently, to generate the descriptive or summary statistics the above code was used.
Notably, among the various descriptive statistics measures, mean, standard deviation, minimum,
and maximum were computed.
T-test.
Moreover, the analysis seeks to assess if there was a difference in mean mental and
physical health for male and female. SEX variable represents the gender whereby 1 represent
Female whereas 2 represents Male.
Physical health
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Null hypothesis: There is no difference in mean physical health score for males and
female
Alternative hypothesis: There is a mean difference in physical health score for males and
female
H0 :μ1 =μ2
H1 : μ1 ≠ μ2
Significance level: 0.05
The following code was used to perform the t-test
/* Computing the t test for physical health score using gender */
proc ttest data=WORK.H192 sides=2 h0=0 plots(showh0);
class SEX;
var PCS42;
run;
As evident, the p-value <0.001 is less than the significance level thus we reject the null
hypothesis and conclude that there is a mean difference in physical health score for males and
female.
female
Alternative hypothesis: There is a mean difference in physical health score for males and
female
H0 :μ1 =μ2
H1 : μ1 ≠ μ2
Significance level: 0.05
The following code was used to perform the t-test
/* Computing the t test for physical health score using gender */
proc ttest data=WORK.H192 sides=2 h0=0 plots(showh0);
class SEX;
var PCS42;
run;
As evident, the p-value <0.001 is less than the significance level thus we reject the null
hypothesis and conclude that there is a mean difference in physical health score for males and
female.

Distribution of PCS42
KernelNormal
2
1
SEX
0
10
20
30
Percent
0
10
20
30
Percent
2
0
10
20
30
40
Percent
0
10
20
30
40
Percent
1
-50 0 50 100
SAQ:PHY COMPONENT SUMMRY SF-12V2 IMPUTED
The graph above shows that physical health scores does not assume a normal distribution
rather is skewed to the left. Moreover, it is evident that Female (1) recorded lower scores
compared to Male (1).
KernelNormal
2
1
SEX
0
10
20
30
Percent
0
10
20
30
Percent
2
0
10
20
30
40
Percent
0
10
20
30
40
Percent
1
-50 0 50 100
SAQ:PHY COMPONENT SUMMRY SF-12V2 IMPUTED
The graph above shows that physical health scores does not assume a normal distribution
rather is skewed to the left. Moreover, it is evident that Female (1) recorded lower scores
compared to Male (1).
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Q-Q Plots of PCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
PCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
PCS42
2
-4 -2 0 2 4
Quantile
-50
0
50
100
PCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
PCS42
1
The graph above show that the scores do not conform to a diagonal straight line thus they
are not from a normal distribution.
Mental health
Null hypothesis: There is no difference in mean mental health score for males and female
Alternative hypothesis: There is a mean difference in mental health score for males and
female
H0 :μ1 =μ2
H1 : μ1 ≠ μ2
/* Computing the t test for mental health score using gender */
proc ttest data=WORK.H192 sides=2 h0=0 plots(showh0);
class SEX;
var MCS42;
run;
-4 -2 0 2 4
Quantile
-50
0
50
100
PCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
PCS42
2
-4 -2 0 2 4
Quantile
-50
0
50
100
PCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
PCS42
1
The graph above show that the scores do not conform to a diagonal straight line thus they
are not from a normal distribution.
Mental health
Null hypothesis: There is no difference in mean mental health score for males and female
Alternative hypothesis: There is a mean difference in mental health score for males and
female
H0 :μ1 =μ2
H1 : μ1 ≠ μ2
/* Computing the t test for mental health score using gender */
proc ttest data=WORK.H192 sides=2 h0=0 plots(showh0);
class SEX;
var MCS42;
run;
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Similarly, the p-value <0.001 is less than the significance level 0.05 thus we reject the
null hypothesis and conclude that there is a mean difference in mental health score for males and
female.
Distribution of MCS42
KernelNormal
2
1
SEX
0
10
20
30
Percent
0
10
20
30
Percent
2
0
10
20
30
40
Percent
0
10
20
30
40
Percent
1
-50 0 50 100
SAQ:MNT COMPONENT SUMMRY SF-12V2 IMPUTED
The graph above shows that mental health scores does not assume a normal distribution
rather is skewed to the left. Moreover, it is evident that Female (1) recorded lower scores
compared to Male (1).
null hypothesis and conclude that there is a mean difference in mental health score for males and
female.
Distribution of MCS42
KernelNormal
2
1
SEX
0
10
20
30
Percent
0
10
20
30
Percent
2
0
10
20
30
40
Percent
0
10
20
30
40
Percent
1
-50 0 50 100
SAQ:MNT COMPONENT SUMMRY SF-12V2 IMPUTED
The graph above shows that mental health scores does not assume a normal distribution
rather is skewed to the left. Moreover, it is evident that Female (1) recorded lower scores
compared to Male (1).

Q-Q Plots of MCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
150
MCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
150
MCS42
2
-4 -2 0 2 4
Quantile
-50
0
50
100
150
MCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
150
MCS42
1
The graph above show that the scores do not conform to a diagonal straight line thus they
are not from a normal distribution.
-4 -2 0 2 4
Quantile
-50
0
50
100
150
MCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
150
MCS42
2
-4 -2 0 2 4
Quantile
-50
0
50
100
150
MCS42
-4 -2 0 2 4
Quantile
-50
0
50
100
150
MCS42
1
The graph above show that the scores do not conform to a diagonal straight line thus they
are not from a normal distribution.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 6
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.