Skip to content
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

Fixes bug in outlier plot method #717

Merged
merged 2 commits into from
Apr 29, 2024
Merged

Conversation

rempsyc
Copy link
Member

@rempsyc rempsyc commented Apr 28, 2024

Closes #711


# Prepare model
library(see)
library(lme4)
library(performance)
set.seed(123)  # for reproducibility
n <- 100
subjectID <- paste("Subject", rep(1:10, each = 10))
PN <- runif(n, 0, 100)
alpha <- 0.5 * PN + rnorm(n, mean = 50, sd = 10)
alpha[c(20, 40)] <- c(150, 160)  # arbitrarily chosen subjects for outliers
data <- data.frame(subjectID, PN, alpha)
model <- lmer(alpha ~ PN + (1 | subjectID), data = data)

# Test
x <- check_outliers(model)
plot(x)

Created on 2024-04-28 with reprex v2.1.0

@rempsyc rempsyc added the Bug 🐛 Something isn't working label Apr 28, 2024
@rempsyc rempsyc self-assigned this Apr 28, 2024
@rempsyc rempsyc requested a review from strengejacke April 28, 2024 12:47
@strengejacke strengejacke merged commit f2da2ad into main Apr 29, 2024
20 of 26 checks passed
@strengejacke strengejacke deleted the check_model_outliers_bug branch April 29, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Outlier detection in Linear mixed models failed?
2 participants