-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Residuals with mixed
-fitted model
#116
Comments
Are you looking for something like this? library(afex)
#> Loading required package: lme4
#> Loading required package: Matrix
#> ************
#> Welcome to afex. For support visit: http://afex.singmann.science/
#> - Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
#> - Methods for calculating p-values with mixed(): 'S', 'KR', 'LRT', and 'PB'
#> - 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests
#> - NEWS: emmeans() for ANOVA models now uses model = 'multivariate' as default.
#> - Get and set global package options with: afex_options()
#> - Set orthogonal sum-to-zero contrasts globally: set_sum_contrasts()
#> - For example analyses see: browseVignettes("afex")
#> ************
#>
#> Attaching package: 'afex'
#> The following object is masked from 'package:lme4':
#>
#> lmer
library(ggeffects)
library(patchwork)
data(md_12.1)
a <- aov_ez("id", "rt", md_12.1, within = c("angle", "noise"))
p1 <- ggemmeans(a, "angle") |>
plot(add.data = TRUE, jitter = 0.1) +
ggplot2::ggtitle("Raw Data")
p2 <- ggemmeans(a, "angle") |>
plot(residuals = TRUE, jitter = 0.1) +
ggplot2::ggtitle("Residualised scores")
#> Data was changed during ANOVA calculation. Thus, residuals cannot be added to original data.
#> residuals(..., append = TRUE) will return data and residuals.
#Compare
p1 + p2 &
ggplot2::coord_cartesian(ylim = c(300, 1000)) Created on 2022-11-28 with reprex v2.0.2 |
Thank you very much. Would it be possible to get Q-Q plots, please? I would also like to comment on the function I used to fit my model, namely, Since that issue, do you know if it has become possible to create Q-Q plots in a way similar to your I have googled into this but to no avail so far. |
P.S. Even if there were a more cumbersome way, I would be very interested in it. |
Hi Henrik,
I would like to ask you if you could please advise me how to create condition-specific residuals plots for
mixed
-fitted models.I have looked for possibilities but to little avail.
Thank you very much
The text was updated successfully, but these errors were encountered: