Question

Use R Studio to answer the following Four medical clinics (A, B, C, D) conducted a...

Use R Studio to answer the following

  1. Four medical clinics (A, B, C, D) conducted a clinical trial for a cancer drug.  Their patient pools were sampled to examine their age distributions. The results are summarized below. Test the hypothesis that clinic and patient age are independent. Use a = 0.05.

(HINT: first make a data frame with four columns and three rows. See the example in the notes with the three shifts and four grades of lumber.)

Medical Clinic

Patient Age

A

B

C

D

0-18

35

28

37

42

19-30

20

22

34

26

>30

12

  8

10

  6

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

R Code

Creation of data matrix
data=matrix(c(35,28,37,42,20,22,34,26,12,8,10,6), nrow = 3, ncol = 4,byrow=TRUE,dimnames = list(c("0-18","19-30",">30"), c("A","B","C","D")))
# Chi square test
chisq <- chisq.test(data)
# p value
chisq$p.value

Now p value is 0.5095548 which is greater than 0.05 (level of significance)
So we do not reject H0 and conclude that clinic and patient age are independent.

Add a comment
Know the answer?
Add Answer to:
Use R Studio to answer the following Four medical clinics (A, B, C, D) conducted a...
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
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