In: Statistics and Probability
I would need both SAS & R code, the output and .txt file/s, please.
Because many HMOs either do not cover mental health costs or provide only minimal coverage, min- isters and priests often need to provide counseling to persons suffering from mental illness. An in- terdenominational organization wanted to determine whether the clerics from different religions have different levels of awareness with respect to the causes of mental illness. Fifteen clerics from different Christian denominations were sampled. Each was given a standard written test to measure his or her knowledge about causes of mental illness. The test scores and number of years serving as a cleric were also recorded. This data is given in the table below.
Cleric |
Denomination |
Test Score |
Years of Service |
1 |
Methodist |
62 |
10 |
2 |
Catholic |
62 |
23 |
3 |
Catholic |
22 |
13 |
4 |
Pentecostal |
37 |
34 |
5 |
Methodist |
25 |
|
6 |
Methodist |
6 |
4 |
7 |
Pentecostal |
15 |
18 |
8 |
42 |
16 |
|
9 |
Catholic |
22 |
40 |
10 |
Catholic |
34 |
8 |
11 |
Methodist |
12 |
37 |
12 |
Methodist |
42 |
|
13 |
Pentecostal |
5 |
18 |
14 |
Catholic |
19 |
32 |
15 |
Methodist |
56 |
28 |
a Enter the data into SAS using a DATALINES statement in the DATA step. Use PROC PRINT to print the resulting data set. Make sure the entire denomination name is displayed. Report your output.
b Create a data frame in R for the data. Print the data frame and report the output.