Question

I would need both SAS & R code, the output and .txt file/s, please. Because many...

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

  1. 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.

  2. b Create a data frame in R for the data. Print the data frame and report the output.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note - Only the Rcode is given. Do not have SAS version to provide screenshots

Inputting the values Cleric < seq (1:15) Denomination < c (Methodist, Catholic,Catholic,Pentecostal, Methodist, Me

Add a comment
Know the answer?
Add Answer to:
I would need both SAS & R code, the output and .txt file/s, please. Because many...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In...

    Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In this project, we combine the concepts of Recursion and Merge Sorting. Please note that the focus of this project is on Merging and don't forget the following constraint: Programming Steps: 1) Create a class called Art that implements Comparable interface. 2) Read part of the file and use Merge Sort to sort the array of Art and then write them to a file. 3)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT