Skip to content

Add functionality to compare coefficiants #264

Open
@mattansb

Description

@mattansb

See https://rdrr.io/cran/psych/man/r.test.html

Would be nice to have an easystats version of this.

Here are some mockups:

Independent correlations

Interface 1: pass a grouped data frames

mtcars |> 
  dplyr::group_by(am) |> 
  compare_correlations(select = c("mpg", "hp", "drat"))
#> # Differences between independant Pearson correlations
#> 
#> Group | Parameter1 | Parameter2 |    r1 |    r2 |  diff |         95% CI |     z |       p
#> -------------------------------------------------------------------------------------------
#> 0 - 1 |        mpg |         hp | -0.83 | -0.13 | -0.71 | [-0.93, -0.61] | -6.17 | < .001***
#> 0 - 1 |        mpg |       drat |  0.47 |  0.50 | -0.03 | [ 0.02,  0.76] |  2.19 | 0.086    
#> 0 - 1 |         hp |       drat | -0.34 | -0.01 | -0.34 | [-0.69,  0.13] | -1.50 | 0.151    
#> 

Interface 2: name variables

compare_correlations(mtcars, select = c("mpg", "hp", "drat"), group = "am")

Dependent correlations

Not sure...

Effect size

Differences between correlations are already pretty standardized... but there is also the difference between Fished z-transformed correlations, which is called Cohen's q.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions