performance
performance copied to clipboard
multiple R instead of R2
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.
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.
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
In most cases, I would expect a user to want one or the other
Does sqrt.performance_model()
makes sense, if it only applies to R2? Why not sqrt.r2_class()
?