# Should I divide p into 2 for a one-tailed test in lsmeans?

I have used LMM with this formula:

f1 <- lmer (dprime_f ~ language_f + (1+language_f|listener_f), data = data1.frame, REML = TRUE)


Then I used lsmeans to run pairwise comparison and this is part of the result:

$contrasts contrast estimate SE df t.ratio p.value eng - second 0.48904390 0.2000843 18 2.444 0.0618 eng - thai -0.06573779 0.2000843 18 -0.329 0.9424 second - thai -0.55478169 0.2000843 18 -2.773 0.0320  Based on my hypothesis: the scores of these three groups will not be significantly different from each other. My question is: Can I summarise the findings based on the p value in this output, or do I need to divide p value with two to consider significant differences of each pair? For the other target sound, my hypothesis is the scores of English will be higher than that of second. I have run LMM, and use lsmeans. Then this is a part of my output from lsmeans: $contrasts
contrast     estimate        SE df t.ratio p.value
eng - second 2.190395 0.2818979  9    7.77  <.0001


In the latter case, do I need to divide p value with two?

No, don't divide any P values by 2. The ones reported are already 2-sided. Moreover, by default they are also adjusted for multiplicity using the Tukey method.

IF they were unadjusted, it would make sense to MULTIPLY each P value by 3 in the first table (that's the Bonferroni correction).

• Hi rvl, sorry that my question might not be clear, it is actually: should I divide p into 2 for a one-tailed test in lsmeans? Commented Sep 1, 2015 at 10:20
• No, you should use the summary or test function and specify the side argument. Don't use the two-sided formula, get the lsmeans and then do the contrasts on the results. See vignette("using-lsmeans") for examples. Something like lsm = lsmeans(f1, "lang"); test(pairs(lsm), side = ">") Commented Sep 1, 2015 at 15:49
• Right. Thank you very much rvl for your replies. They're very helpful. ^^ Commented Sep 2, 2015 at 8:02

There are not just three groups. There are four groups for language. Presumably, English speaking is the referent group which is not displayed as a coefficient in the model output. So can you clarify: Are you interested in the 3-df test of whether the mean of any of the 4 language groups differs? Or did you mean to exclude English speakers from the analysis and forget to do so?

In either case, the default output simply gives you the test of whether or not any of the 3 language groups differs from the default group (which I will call "English Speaking"). This isn't the test you need. The test for whether any of the groups differ would be best to take from the likelihood ratio test for the model that you fit against a null model:

f1 <- lmer (dprime_f ~ (1|listener_f), data = data1.frame, REML = TRUE)

That would be the 3 degree of freedom test of significant differences in the language groups. By conducting a multi-degree of freedom test, you avoid multiple testing issues and obtain a p-value for your hypothesis, as you've stated it, with the null being: there is no difference in "dprime_f" comparing language groups within a particular listener.

• Hi AdamO, there are three groups. The output that I show you is the output from pairwise comparison run by lsmeans package based on LMM, not the direct output from LMM. So what you see now is the pairwise comparison. Commented Sep 1, 2015 at 9:53