最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to get emmeans to not use inf degrees of freedom - Stack Overflow

programmeradmin0浏览0评论

I'm fairly new to R and stats. I'm exploring if the animals moved or not in their behavioral trials. My sample size is small (10 participants) and my IV has four levels, one trial of each level, it is repeated measures.

I am currently trying to complete a binomial glm using the glmer function.

When I then run the post hoc through the emmeans package it produces inf degrees of freedom, and I'd like it to produce actual degrees of freedom.

My code is as follows

dragonletmoveyn <- glmer(latency_to_move ~ view
                        + (view|subject) + (view|trial), 
                        data = dragonlatencycount, family = binomial) 
diagnostics.func(dragonletmoveyn)
null_model_dragonletmoveyn <- update(dragonletmoveyn, .~. -view)
anova(null_model_dragonletmoveyn, dragonletmoveyn, test="Chisq") 
dragonletmoveynposthoc <- emmeans(dragonletmoveyn, specs = pairwise ~ view, type = "response")
summary(dragonletmoveynposthoc)

I've tried specifing the lmer.df = "kenward-roger" function and with satterthwaite but the model seems to ignore the command.

I also tried setting my df = 3 as my glmer states in it's dfs but I'm not sure this method is right, either.

So, I have three questions

  1. how can I get the emmeans code to note the demand for the degrees of freedom to stop displaying inf
  2. how can I calculate the df's that I should be getting emmeans to use, if I am going to tell it which ones to use? Can I use the dfs from my glmer anova summary?
  3. Is there any other alterntive methods you would recommend?

My other option is not using the emmeans package, and doing a contrasts or data subset comparison, but this is obviously a lot longer!

Thanks

发布评论

评论列表(0)

  1. 暂无评论