Skip to content

lme approximation method for dfs

2 messages · Maarten Jung, Salahadin Lotfi

#
Hi Sala,

Please keep the mailing list in cc.

Looks like you don't have the latest emmeans version. In previous versions
"appx-satterthwaite" was termed "boot-satterthwaite" (see [1]). But
according to [1] just "satterthwaite" should also work; however, this
misses the point that the degrees of freedom that emmeans calculates are
*approximations to* the Satterthwaite approximation (again, see [1]).

[1] https://cran.r-project.org/web/packages/emmeans/vignettes/models.html#K

Best,
Maarten

On Mon, 25 May 2020, 21:18 Salahadin Lotfi <salahadin.lotfi at gmail.com>
wrote:

  
  
#
Hi Maarten,
Sorry I kept forgetting to CC the list.
Hmm! The approximations of the approximations (the source [1] indeed
clearly mentions that). So, I figured what was the source of the error when
I tried "appx-satterthwaite" and it didn't work. I summarize that down here
for future reference if folks run into the same problem.
1) Make sure emmeans library is the most update to date (thanks Maarten to
pointing out to that). Otherwise, you might get this error below:

*Error in match.arg(mode) :   'arg' should be one of ?containment?,
?satterthwaite?, ?boot-satterthwaite?, ?auto?*

2) If the model specification is too complex and you get *"non-positive
definite approximate variance-covariance"* for the covariance matrix, the
function* joint_tests()* with *mode =   "appx-satterthwaite" *won't work
and it throws this error:



*Error in emm_basis.lme(object, trms, xlev, grid, misc = attr(data,
"misc"),  :   Unable to estimate Satterthwaite parametersIn addition:
Warning message:In seq_len(nrow(B)) : first element used of 'length.out'
argument*


This is completely making sense (I "think" the
sattherthwaite approximation would not be possible with second-order finite
differences). Thus, this error is actually a good sign that the model is
not appropriate for the data (small data?), particularly because non-dp
approximation goes undetected by *summary() function*. Hence, run a less
complicated model.

I hope the summary is accurate.
Thanks a bunch, Maarten.
Sala

[1] https://cran.r-project.org/web/packages/emmeans/vignettes/models.html#K


*************
Salahadin (Sala) Lotfi

PhD Candidate of Cognitive Neuroscience

University of Wisconsin-Milwaukee

Anxiety Disorders Laboratory

President, Association of Clinical and Cognitive Neuroscience, UWM

On Mon, May 25, 2020 at 3:11 PM Maarten Jung <
Maarten.Jung at mailbox.tu-dresden.de> wrote: