If we go on to do this for all possible pairs of variables, we can look to see which (if any) pairs of groups are significantly different to each other. Regardless of which version we do, R will print out the results of the t-test, though I haven’t included that output here. See Chapter 7 if you’ve forgotten how the %in% operator works. Subset = drug %in% c("placebo","anxifree"), Or, you could use the subset argument in the t.test() function to select only those observations corresponding to one of the two groups we’re interested in: t.test( formula = mood.gain ~ drug, Placebo <- with(ial, mood.gain) # mood change due to placebo One method would be to construct new variables corresponding the groups you want to compare (e.g., anxifree, placebo and joyzepam), and then run a t-test on these new variables: t.test( anxifree, placebo, var.equal = TRUE ) # Student t-testĪnxifree <- with(ial, mood.gain) # mood change due to anxifree ![]() There’s a couple of ways that we could do this. How might we go about solving our problem? Given that we’ve got three separate pairs of means (placebo versus Anxifree, placebo versus Joyzepam, and Anxifree versus Joyzepam) to compare, what we could do is run three separate t-tests and see what happens. However, if we want to get a clearer answer about this, it might help to run some tests. For instance, if we look at the plots in Figure 14.1, it’s tempting to conclude that Joyzepam is better than the placebo and better than Anxifree, but there’s no real difference between Anxifree and the placebo. ![]() The next question to ask is, which of the other seven possibilities do we think is right? When faced with this situation, its usually helps to look at the data. When we characterise the null hypothesis in terms of these three distinct propositions, it becomes clear that there are eight possible “states of the world” that we need to distinguish between: possibility:īy rejecting the null hypothesis, we’ve decided that we don’t believe that #1 is the true state of the world. It would even be useful to check the performance of Anxifree against the placebo: even if Anxifree has already been extensively tested against placebos by other researchers, it can still be very useful to check that your study is producing similar results to earlier work. But which ones? All three of these propositions are of interest: you certainly want to know if your new drug Joyzepam is better than a placebo, and it would be nice to know how well it stacks up against an existing commercial alternative (i.e., Anxifree). ![]() So, now that we’ve rejected our null hypothesis, we’re thinking that at least one of those things isn’t true. If any one of those three claims is false, then the null hypothesis is also false. Anxifree and Joyzepam are equally effective (i.e., μ J=μ A).Your drug (Joyzepam) is no better than a placebo (i.e., μ J=μ P). ![]() Your competitor’s drug (Anxifree) is no better than a placebo (i.e., μ A=μ P).But if you think about it, the null hypothesis is actually claiming three different things all at once here. In our drugs example, our null hypothesis was that all three drugs (placebo, Anxifree and Joyzepam) have the exact same effect on mood. \)Īny time you run an ANOVA with more than two groups, and you end up with a significant effect, the first thing you’ll probably want to ask is which groups are actually different from one another.
0 Comments
Leave a Reply. |