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

Extend man page #278

Open
Thibaultfq opened this issue Jan 20, 2023 · 2 comments
Open

Extend man page #278

Thibaultfq opened this issue Jan 20, 2023 · 2 comments

Comments

@Thibaultfq
Copy link

By looking at the source code, I found out about a cool feature that i needed but is nowhere mentioned. This is, the "target" parameter in the summary of a easycorrelation object. I needed a matrix of the correlations but with p and df (degrees of freedom) values. This is available, though separately, by using the parameter "target".

example to get the p-values of a correlation matrix or for each correlation test:

results <- correlation(iris)
summary(results, target="p")
## # Correlation Matrix (pearson-method)
##
## Parameter    | Petal.Width | Petal.Length | Sepal.Width
## -------------------------------------------------------
## Sepal.Length |    9.30e-37 |     5.19e-47 |        0.15
## Sepal.Width  |    8.15e-06 |     1.35e-07 |            
## Petal.Length |    2.81e-85 |              |             

example to get the degrees of freedom of each correlation test (here all equal, but not always the case)
example:

results <- correlation(iris)
summary(results, target="n_Obs")
## # Correlation Matrix (pearson-method)
##
## Parameter    | Petal.Width | Petal.Length | Sepal.Width
## -------------------------------------------------------
## Sepal.Length |   150.00*** |    150.00*** |      150.00
## Sepal.Width  |   150.00*** |    150.00*** |            
## Petal.Length |   150.00*** |              |                  

Using tidyverse and as_tibble, one can easily add these two together creating all the info needed in one matrix.

@DominiqueMakowski
Copy link
Member

Hi @Thibaultfq, would you be interested in contributing a small PR to add this to the docs somewhere :) ?

@etiennebacher
Copy link
Member

By the way, all functions in R/methods.easycorrelation.R should be properly documented, not just summary.easycorrelation() (but @Thibaultfq feel free to document as many as you want if you want to contribute)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants