The variable in the data frame include; x, id is the patient id, y, sex (1 – Male, 2- Female), age is age of patient, trt is treatment, baseline, and time variables.
Ha: There is independence between sex and treatment
Hb: There is no independence between sex and treatment
Sex and treatment status are independent at p = 0.5.
Aim: To test whether there is independence between sex of the patient and treatment. This test is significant in that it could enable the understanding whether the sex of the patient influenced their decision to seek treatment.
>table(mydata$sex,mydata$trt)
1 2
1 129 120
2 318 339
> art_tab <- table(mydata$sex,mydata$trt) #create contingency table
>art_tab #on sex –(1= Male, 2 = Female), Treatment Status – (1 = YES, 2 = NO)
Treatment Status | |||
Sex | 1 | 2 | |
1 | 129 | 120 | |
2 | 318 | 339 |
> > chisq.test(art_tab)
Pearson’s Chi-squared test with Yates’ continuity correction
data: art_tab
X-squared = 0.70704, df = 1, p-value = 0.4004
From the Chi-square test, the calculated p-value printed is less than p = 0.5, 0.4004 is less than 0.5. That is, p<0.5 hence reject the null hypothesis that there is independence between sex and treatment status. Conclude that, there is no independence between sex and treatment status. Therefore, the sex of an arthritis patient does not influence their decision to get treatment.
This research question and hypothesis is evident from past research studies by (Li et al., 2009) in which the researchers found out that sex does not significantly influence the expression of arthritis and decision to get treatment. Also, in (Barnabe et al., 2012) found out that sex differences in pain scores and localization in inflammatory arthritis, women had higher pain levels but both male and female received treatment without significant differences.
References
Barnabe, C., Bessette, L., Flanagan, C., Leclercq, S., Steiman, A., & Kalache, F. et al. (2012). Sex Differences in Pain Scores and Localization in Inflammatory Arthritis: A Systematic Review and Meta-analysis. The Journal of Rheumatology, 39(6), 1221-1230. doi: 10.3899/jrheum.111393
Li, Y., Lee, P., Sobel, E., Narain, S., Satoh, M., & Segal, M. et al. (2009). Women, men, and rheumatoid arthritis: analyses of disease activity, disease characteristics, and treatments in the QUEST-RA Study. Arthritis Research & Therapy, 11(1), R6. doi: 10.1186/ar2591