Session Ready
Exercise

Comparing means

In a previous exercise, we derived the percentage change from baseline in headache score at Month 12, pct.month12, in the Acupuncture dataset. Here, we will use the two-sample t-test to compare the means in the two treatment groups.

We will also re-run the t-test with compareGroups to generate a nice summary. The compareGroups library and Acupuncture dataset have been preloaded for this session.

Instructions
100 XP
  • Use the t.test() function to test that the means of pct.month12 are equal in the treatment groups, treatment.group. Assume equal variances.
  • Use compareGroups() to re-run the t-test (this is the default test within the function).
  • UsecreateTable() to save the results.
  • Display the summary.