ElMaestro
★★★

Belgium?,
2019-02-26 13:40

Posting: # 19975
Views: 1,325
 

 lsmeans not estimable, but lsmean differences are? [R for BE/BA]

Hi all,

I have a funny situation with one of my datasets:

In a semireplicated trial I am using the lsmeans package and syntax like
lnCI=confint(pairs(lsmeans(M, "Trt"), reverse =F), level=0.9)


to extract CIs from my model M where treatment is coded as "Trt" having two levels and it works just fine.

However, if I do something like
lsmeans(M, "Trt")


then I am getting "nonEst" of both rows in the column for the derived lsmeans.

So, R is telling me that it can derive a difference of lsmeans but it can't derive the lsmeans individually. I find this quite annoying, possibly hard to believe. On processing the same data with WNL, it (WNL) seems to be able to derive LSmeans, and it is getting the same difference in LSmeans as R.

Did anyone encounter this situation? I am quite baffled myself :confused:. Google isn't my friend. My own understanding of the LSmean derivation is a bit lacking, otherwise I'd much prefer to just write code myself and not rely on the package.

I really wish I could publish the dataset for someone to reproduce the situation, but I can't offer to do so at present.

Many thanks.:-)

I could be wrong, but...

Best regards,
ElMaestro

"Pass or fail" (D. Potvin et al., 2008)
mittyri
★★  

Russia,
2019-02-28 12:37
(edited by mittyri on 2019-02-28 17:49)

@ ElMaestro
Posting: # 19980
Views: 1,091
 

 Ask the author

Hi ElMaestro,

First of all I don't know the answer.
But I'm recalling some similar situation when emmeans package couldn't compute lsmeans but gives good solution for the difference. Moreover, the concept of subject nested within sequence didn't work for lsmeans

I mailed to the author (Russel Lenth) and we discussed the problem. Some weeks later he updated the package and the problem was resolved. But you should be ready to share some example.
Hope it helps.


Edit: Package linked. [Helmut]

Kind regards,
Mittyri
d_labes
★★★

Berlin, Germany,
2019-03-03 14:07

@ ElMaestro
Posting: # 19988
Views: 1,009
 

 lsmeans not estimable, but lsmean differences are

Dear ElMaestro,

» So, R is telling me that it can derive a difference of lsmeans but it can't derive the lsmeans individually. I find this quite annoying, possibly hard to believe.

With the last sentence I agree totally.
Nevertheless such situations exist :yes:.

I have sometimes encounter this situation in SAS using the LSMeans statement in Proc GLM.

See the FAQs for emmeans for an R implementation. Look under point 8.

Why this is so precisely is beyond my intellectual reach. Had to tackle such things like "estimability theory". Oh my dear!

My own explanation, quick and dirty only for myself, goes like this: Some factors constellations used in LSMeans which lead to the NonEst result cancel out if you derive LSMeans for the difference and therefore the latter are estimable.

Regards,

Detlew
Activity
 Admin contact
20,644 posts in 4,328 threads, 1,436 registered users;
online 31 (0 registered, 31 guests [including 15 identified bots]).
Forum time: 17:58 CEST (Europe/Vienna)

No one should approach the temple of science
with the soul of a money changer.    Thomas Browne

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5