lmertest

How to extract the goodness-of-fit statistics from lmer() model for msummary from modelsummary package

给你一囗甜甜゛ 提交于 2021-02-04 21:06:17
问题 I am using lmerTest::lmer() to perform linear regression with repeated measures data. My model contains a fixed effect (factor with 5 levels) and a random effect (subject): library(lmerTest) model_lm <- lmer(likertscore ~ task.f + (1 | subject), data = df_long) I would like to include the total number of observations, the number of subjects, total R^2, and the R^2 of the fixed effects in the regression table which I generate with modelsummary() . I tried to extract these and build a gof_map

How to extract the goodness-of-fit statistics from lmer() model for msummary from modelsummary package

对着背影说爱祢 提交于 2021-02-04 21:02:03
问题 I am using lmerTest::lmer() to perform linear regression with repeated measures data. My model contains a fixed effect (factor with 5 levels) and a random effect (subject): library(lmerTest) model_lm <- lmer(likertscore ~ task.f + (1 | subject), data = df_long) I would like to include the total number of observations, the number of subjects, total R^2, and the R^2 of the fixed effects in the regression table which I generate with modelsummary() . I tried to extract these and build a gof_map

lmerTest:::anova uses lazy loading of data sets?

*爱你&永不变心* 提交于 2019-12-24 10:57:44
问题 Ran into this problem while trying to get the empirical distribution of the K-R degrees of freedom... This seems like fairly dangerous behaviour? Does it constitute a bug? Reproducible example: ## import lmerTest package library(lmerTest) ## an object of class merModLmerTest m <- lmer(Informed.liking ~ Gender+Information+Product +(1|Consumer), data=ham) # simulate data from fitted model simData=ham simData$Informed.liking=unlist(simulate(m)) # fit model to simulated data m1 <- lmer(Informed

lmerTest::anova not showing p-values

倾然丶 夕夏残阳落幕 提交于 2019-12-08 13:15:10
问题 I am asking a new question because the dublicate (anova() does not display p-value when used with lmerTest) is not really providing an answer: I ran into the same problem that lmerTest::anova will not output degrees of freedom and p-values for a specific model (that is much less complicated than the one in the post mentioned above): DirectionFit <- lmer(Similarity ~ picture_category * ComparisonType + (1 + picture_category + ComparisonType|Subject), data = DirectionData, REML=FALSE) I noticed