check_model: Enhance point identification
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- data-visualization
Research direction
Start with the check_model() entry point and compare its panels with the supplied plot.lm() example using the Davis data and davis.mod. Determine how noteworthy points are identified and whether existing documentation covers point labels and graphic controls; done means the influential case can stand out consistently across all requested panels with configurable labeling and point appearance.
Written by the indexing model from the issue text.
Description
I would like to use check_model() as a a substitute for stats::plot.lm() because it gives generally prettier and more informative plots!
However it seems to fail my requirement for sensible point labelling of noteworthy points in all the panels and for control of the graphic features (e.g., point size/color) related to this. Or, perhaps I missed something in the documentation?
Here is a minimal example. What is important here is that there is one case (number 12) which is highly influential and should be made to stand out in all the plots.
library(tidyverse)
library(performance)
data(Davis, package="carData")
# remove missings
Davis <- Davis |>
drop_na()
davis.mod <- lm(repwt ~ weight * sex, data=Davis)
check_model(davis.mod,
check=c("linearity", "qq",
"homogeneity", "outliers"))
This gives:
Compare with the result of plot.lm(). Here, I used options id.n, cex.id and others to make the points I wanted to highlight stand out.
op <- par(mfrow = c(2,2), mar = c(5, 5, 3, 1) + .1)
plot(davis.mod,
cex.lab = 1.2, cex = 1.1,
id.n = 2, cex.id = 1.2, lwd = 2)
par(op)
This gives:
So, can I suggest an enhancement to the plots produced to make this possible?
- Dominant language
- R
- Stars
- 1.2k
- Forks
- 108
- Avg merge
- 23h 15m
- Merged PRs (30d)
- 28
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from easystats/performance
-
`check_outliers()`: Cook's distances land on the wrong rows when the model skips or reorders rowsOpen3 investigators :grey_question::question: Bug :bug:
Difficulty 4/5 3-5 days Newbie friendliness 22/100
easystats/performance#981 ·
Maintainers usually reply within 1 day
-
Docs :books: Enhancement :boom:
Difficulty 5/5 Over a week Newbie friendliness 45/100
easystats/performance#901 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Enhancement :boom:
Difficulty 4/5 3-5 days Newbie friendliness 35/100
easystats/performance#891 ·
Maintainers usually reply within 1 day
-
Enhancement :boom:
Difficulty 4/5 3-5 days Newbie friendliness 35/100
easystats/performance#825 ·
Maintainers usually reply within 1 day
-
Waiting for response :love_letter:
Difficulty 4/5 3-5 days Newbie friendliness 35/100
easystats/performance#807 · 10 comments ·
Maintainers usually reply within 1 day
All issues in easystats/performance
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stan-dev/priorsense#150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
xuzhougeng/wisp-science#1571 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bennettoxford/opencodecounts#170 ·