Solved – Comparison of means in R

I have the following boxplots of a quantitative trai by medication group. I would like to compare Med0 against all the other groups. Which statistical test in R would be appropriate in this case?Med0 are basically healthy individuals and med1-4 cases in different medications. All groups contain independent samples.

Thanksenter image description here

Would recommend using a T-Test for comparison of means for each individual comparison against the Med0 group:

$$ T_k = frac{bar{X}_2 – bar{X}_1}{sqrt{frac{s_1^2}{n_1}+frac{s_2^2}{n_2}}}$$


$$qquad k = min( n_1 – 1, n_2 – 1)$$

$$qquad s^2 = frac{sum (X_{i} – bar{X})^2}{n-1}$$

This can be done in R with the following command:


Similar Posts:

Rate this post

Leave a Comment