easystats / easystats/performance
multiple R instead of R2
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.2k
- Forks
- 109
- Avg merge
- 6h 34m
- Merged PRs (30d)
- 8
Description
I'd like to have a method to transform R2 indices into multiple correlations (R).
I am thinking a an S3 method for sqrt() that transforms appropriate columns might be good.
m <- lm(mpg ~ disp * hp, data = mtcars)
p <- performance::performance(p)
sqrt.performance_model <- function(x) {
x |> mutate(R2 = sqrt(R2), R2_adjusted = sqrt(R2_adjusted)) |> rename(R = R2, R_adjusted = R2_adjusted)
}
sqrt(p)
What do you think @strengejacke @mattansb @DominiqueMakowski ? This could also be applied in effectsize.
Contributor 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.
Research direction
Start with the supplied lm() and performance::performance() example and inspect the resulting performance object and its R2 columns. The proposed sqrt.performance_model entry point should produce R and R_adjusted values when sqrt(p) is called; verify the behavior on the example and add coverage for the transformation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100