runehaubo / lmerTestR

Repository for the R-package lmerTest
48 stars 9 forks source link

problems for displaying Least Squares Means tables from "ls_means" and "difflsmeans" functions from lmerTest package #24

Closed JulianGaviriaL closed 3 years ago

JulianGaviriaL commented 5 years ago

HI,

I fitted the next model:


`Model<- "Observations ~ Condition*Emotion + `(1|ID)"`

`Result<-lmer(Model,data=stats)`
`summary(Result)`  #works
hist(resid(Result))  #works 
anova(Result,type=2) `#works`

Problem: I called the "ls_means" and difflsmeans" functions from lmerTest package, as I used to do it:

lsmeansLT(Result) difflsmeans(Result)

Then, instead of the result tables, I've got:

Least Squares Means table:
     Estimate Std. Error df t value lower upper Pr(>|t|)
  Confidence level: 95%
  Degrees of freedom method: Satterthwaite 

> difflsmeans(Result)
Least Squares Means table:

     Estimate Std. Error df t value lower upper Pr(>|t|)

  Confidence level: 95%
  Degrees of freedom method: Satterthwaite 

For this reason I tried the new lines for calling these functions, proposed in the PDF file which was released this year: https://cran.r-project.org/web/packages/lmerTest/lmerTest.pdf

`ls_means(Result,` which = NULL, level = 0.95, ddf= c("Satterthwaite", "Kenward-Roger"), pairwise = TRUE)

difflsmeans(Result, which = NULL, level = 0.95, ddf = c("Satterthwaite", `"Kenward-Roger")`

And the output is the same:

> ls_means(Result, which = NULL, level = 0.95, 
+          ddf= c("Satterthwaite", "Kenward-Roger"), pairwise = FALSE)
Least Squares Means table:

     Estimate Std. Error df t value lower upper Pr(>|t|)

  Confidence level: 95%
  Degrees of freedom method: Satterthwaite 

I wonder whether there is a compatibility issue with the latest R version (3.6.0). Although I tried in an older version (3.5.2), and in 2 different OS (windows, mac), and the result is the same. I also checked for the object class:

> inherits(Result, "lmerModLmerTest")
[1] TRUE 

Thanks in advance for any hint for identifying where the problem comes from. I used these functions without problems previously (December/2018).

runehaubo commented 5 years ago

I think I'd need the data or at least a reproducible example to debug this. If you are not allowed/comfortable sharing the data openly, can you send them privately in an email? (I will not share or distribute the data)

Cheers Rune

JulianGaviriaL commented 5 years ago

Hi Rune, I sent you the data by email. Thanks in advance for confirming that I used the right email address, and of course, for your comments on this issue.

With best regards,

Julian,