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

multiple R instead of R2 #371

Open
bwiernik opened this issue Oct 4, 2021 · 4 comments
Open

multiple R instead of R2 #371

bwiernik opened this issue Oct 4, 2021 · 4 comments
Labels
Enhancement 💥 Implemented features can be improved or revised

Comments

@bwiernik
Copy link
Contributor

bwiernik commented Oct 4, 2021

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.

@bwiernik bwiernik added the Enhancement 💥 Implemented features can be improved or revised label Oct 4, 2021
@mattansb
Copy link
Member

mattansb commented Oct 5, 2021

This can be added as a column always / show up in the print method, maybe?

Similar to how tolerance shows up in the VIF print.

@DominiqueMakowski
Copy link
Member

DominiqueMakowski commented Oct 5, 2021

This can be added as a column always / show up in the print method

I'm not sure it's necessary to clutter the printing with this as it's not a critical info is it? So I'd say a method sounds good

@bwiernik
Copy link
Contributor Author

bwiernik commented Oct 5, 2021

In most cases, I would expect a user to want one or the other

@strengejacke
Copy link
Member

Does sqrt.performance_model() makes sense, if it only applies to R2? Why not sqrt.r2_class()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💥 Implemented features can be improved or revised
Projects
None yet
Development

No branches or pull requests

4 participants