emmeans

package emmeans in R not returning effect sizes

空扰寡人 提交于 2020-05-28 06:12:14
问题 I'm following this tutorial as well as ?eff_size from package emmeans to compute eff_size() for my regression model below. But I get the error: need an object with call component from the eff_size() call. Am I missing something? library(lme4) library(emmeans) h <- read.csv('https://raw.githubusercontent.com/hkil/m/master/h.csv') h$year <- as.factor(h$year) m <- lmer(scale~year*group + (1|stid), data = h) ems <- emmeans(m, pairwise ~ group*year, infer = c(T, T)) eff_size(ems, sigma = sigma(m),

get significance of simple effects with emtrends

折月煮酒 提交于 2019-12-14 02:44:57
问题 I can get the significance of pairwise comparisons with the following code m <- lmer(angle ~ recipe*temp + (1|replicate), data=cake) emtrends(m, pairwise~recipe, var="temp") $emtrends recipe temp.trend SE df lower.CL upper.CL A 0.1537143 0.02981898 250 0.09498586 0.2124427 B 0.1645714 0.02981898 250 0.10584300 0.2232999 C 0.1558095 0.02981898 250 0.09708110 0.2145379 $contrasts contrast estimate SE df t.ratio p.value A - B -0.010857143 0.0421704 250 -0.257 0.9641 A - C -0.002095238 0.0421704

post hoc - comparison of point on slope to another group

别等时光非礼了梦想. 提交于 2019-12-13 03:47:05
问题 I have a model that combines a dummy and a continuous variable to describe an outcome following a disturbance. So if there was a disturbance, I have time measurements at times 1:16 following the disturbance. If there was no disturbance in the recent past, the outcome is coded to a fake time value of -1. Here's a representation of the dataset: library(lme4) library(ggplot2) df <- data.frame(ID = rep(c("a", "b", "c"), each = 20), Time = c(1:16, -1, -1, -1, -1, 1:16, -1, -1, -1, -1, 1:16, -1, -1

Can I use emmeans with LME model?

℡╲_俬逩灬. 提交于 2019-12-02 15:19:49
问题 I am using LME model defined like: mod4.lme <- lme(pRNFL ~ Init.Age + Status + I(Time^2), random= ~1|Patient/EyeID,data = long1, na.action = na.omit) The output is: > summary(mod4.lme) Linear mixed-effects model fit by REML Data: long1 AIC BIC logLik 2055.295 2089.432 -1018.647 Random effects: Formula: ~1 | Patient (Intercept) StdDev: 7.949465 Formula: ~1 | EyeID %in% Patient (Intercept) Residual StdDev: 12.10405 2.279917 Fixed effects: pRNFL ~ Init.Age + Status + I(Time^2) Value Std.Error DF

Can I use emmeans with LME model?

荒凉一梦 提交于 2019-12-02 07:32:15
I am using LME model defined like: mod4.lme <- lme(pRNFL ~ Init.Age + Status + I(Time^2), random= ~1|Patient/EyeID,data = long1, na.action = na.omit) The output is: > summary(mod4.lme) Linear mixed-effects model fit by REML Data: long1 AIC BIC logLik 2055.295 2089.432 -1018.647 Random effects: Formula: ~1 | Patient (Intercept) StdDev: 7.949465 Formula: ~1 | EyeID %in% Patient (Intercept) Residual StdDev: 12.10405 2.279917 Fixed effects: pRNFL ~ Init.Age + Status + I(Time^2) Value Std.Error DF t-value p-value (Intercept) 97.27827 6.156093 212 15.801950 0.0000 Init.Age 0.02114 0.131122 57 0