Skip to content

Commit e0a84a5

Browse files
more details about types in vignettes
1 parent 32f4cdb commit e0a84a5

File tree

2 files changed

+180
-9
lines changed

2 files changed

+180
-9
lines changed

vignettes/bibliography.bib

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
@Manual{Rteam,
2+
title = {R: A Language and Environment for Statistical Computing},
3+
author = {{R Core Team}},
4+
organization = {R Foundation for Statistical Computing},
5+
address = {Vienna, Austria},
6+
year = {2019},
7+
url = {https://www.R-project.org/},
8+
}
9+
10+
@article{shan2020correlation,
11+
doi = {10.1155/2020/7398324},
12+
url = {https://doi.org/10.1155%2F2020%2F7398324},
13+
year = 2020,
14+
month = {mar},
15+
publisher = {Hindawi Limited},
16+
volume = {2020},
17+
pages = {1--11},
18+
author = {Guogen Shan and Hua Zhang and Tao Jiang},
19+
title = {Correlation Coefficients for a Study with Repeated Measures},
20+
journal = {Computational and Mathematical Methods in Medicine}
21+
}
22+
23+
@Manual{ludecke2019see,
24+
title = {see: Visualisation Toolbox for 'easystats' and Extra Geoms, Themes and Color Palettes for 'ggplot2'},
25+
author = {Daniel Lüdecke and Philip Waggoner and Mattan S. Ben-Shachar and Dominique Makowski},
26+
year = {2019},
27+
note = {R package version 0.2.0.9000},
28+
url = {https://easystats.github.io/see/},
29+
}
30+
31+
@article{ludecke2019insight,
32+
journal = {Journal of Open Source Software},
33+
doi = {10.21105/joss.01412},
34+
issn = {2475-9066},
35+
number = {38},
36+
publisher = {The Open Journal},
37+
title = {insight: A Unified Interface to Access Information from Model Objects in R},
38+
url = {http://dx.doi.org/10.21105/joss.01412},
39+
volume = {4},
40+
author = {Lüdecke, Daniel and Waggoner, Philip and Makowski, Dominique},
41+
pages = {1412},
42+
date = {2019-06-25},
43+
year = {2019},
44+
month = {6},
45+
day = {25},
46+
}
47+
48+
@article{Bhushan_2019,
49+
doi = {10.3389/fpsyg.2019.01050},
50+
url = {https://doi.org/10.3389%2Ffpsyg.2019.01050},
51+
year = 2019,
52+
month = {may},
53+
publisher = {Frontiers Media {SA}},
54+
volume = {10},
55+
author = {Nitin Bhushan and Florian Mohnert and Daniel Sloot and Lise Jans and Casper Albers and Linda Steg},
56+
title = {Using a Gaussian Graphical Model to Explore Relationships Between Items and Variables in Environmental Psychology Research},
57+
journal = {Frontiers in Psychology}
58+
}
59+
60+
61+
@article{makowski2019bayestestr,
62+
title = {{bayestestR}: {Describing} {Effects} and their {Uncertainty}, {Existence} and {Significance} within the {Bayesian} {Framework}},
63+
volume = {4},
64+
issn = {2475-9066},
65+
shorttitle = {{bayestestR}},
66+
url = {https://joss.theoj.org/papers/10.21105/joss.01541},
67+
doi = {10.21105/joss.01541},
68+
number = {40},
69+
urldate = {2019-08-13},
70+
journal = {Journal of Open Source Software},
71+
author = {Makowski, Dominique and Ben-Shachar, Mattan and Lüdecke, Daniel},
72+
month = aug,
73+
year = {2019},
74+
pages = {1541}
75+
}
76+
77+
@article{Wickham_2019,
78+
doi = {10.21105/joss.01686},
79+
url = {https://doi.org/10.21105%2Fjoss.01686},
80+
year = 2019,
81+
month = {nov},
82+
publisher = {The Open Journal},
83+
volume = {4},
84+
number = {43},
85+
pages = {1686},
86+
author = {Hadley Wickham and Mara Averick and Jennifer Bryan and Winston Chang and Lucy McGowan and Romain Fran{\c{c}}ois and Garrett Grolemund and Alex Hayes and Lionel Henry and Jim Hester and Max Kuhn and Thomas Pedersen and Evan Miller and Stephan Bache and Kirill Müller and Jeroen Ooms and David Robinson and Dana Seidel and Vitalie Spinu and Kohske Takahashi and Davis Vaughan and Claus Wilke and Kara Woo and Hiroaki Yutani},
87+
title = {Welcome to the Tidyverse},
88+
journal = {Journal of Open Source Software}
89+
}
90+
91+
@article{epskamp2018estimating,
92+
doi = {10.3758/s13428-017-0862-1},
93+
url = {https://doi.org/10.3758%2Fs13428-017-0862-1},
94+
year = 2018,
95+
month = {feb},
96+
publisher = {Springer Science and Business Media {LLC}},
97+
volume = {50},
98+
number = {1},
99+
pages = {195--212},
100+
author = {Sacha Epskamp and Denny Borsboom and Eiko I. Fried},
101+
title = {Estimating psychological networks and their accuracy: A tutorial paper},
102+
journal = {Behavior Research Methods}
103+
}
104+
105+
@article{bakdash2017repeated,
106+
doi = {10.3389/fpsyg.2017.00456},
107+
url = {https://doi.org/10.3389%2Ffpsyg.2017.00456},
108+
year = 2017,
109+
month = {apr},
110+
publisher = {Frontiers Media {SA}},
111+
volume = {8},
112+
author = {Jonathan Z. Bakdash and Laura R. Marusich},
113+
title = {Repeated Measures Correlation},
114+
journal = {Frontiers in Psychology}
115+
}
116+
117+
@article{bishara2017confidence,
118+
title={Confidence intervals for correlations when data are not normal},
119+
author={Bishara, Anthony J and Hittner, James B},
120+
journal={Behavior research methods},
121+
volume={49},
122+
number={1},
123+
pages={294--309},
124+
year={2017},
125+
publisher={Springer},
126+
doi={10.3758/s13428-016-0702-8}
127+
}
128+
129+
@article{langfelder2012fast,
130+
title={Fast R functions for robust correlations and hierarchical clustering},
131+
author={Langfelder, Peter and Horvath, Steve},
132+
journal={Journal of statistical software},
133+
volume={46},
134+
number={11},
135+
year={2012},
136+
publisher={NIH Public Access},
137+
url={http://www.jstatsoft.org/v46/i11/}
138+
}
139+
140+
141+
@article{fieller1957tests,
142+
title={Tests for rank correlation coefficients. I},
143+
author={Fieller, Edgar C and Hartley, Herman O and Pearson, Egon S},
144+
journal={Biometrika},
145+
volume={44},
146+
number={3/4},
147+
pages={470--481},
148+
year={1957},
149+
publisher={JSTOR},
150+
doi={10.1093/biomet/48.1-2.29}
151+
}
152+
153+
@Manual{BayesFactor,
154+
title = {BayesFactor: Computation of Bayes Factors for Common Designs},
155+
author = {Richard D. Morey and Jeffrey N. Rouder},
156+
year = {2018},
157+
note = {R package version 0.9.12-4.2},
158+
url = {https://CRAN.R-project.org/package=BayesFactor},
159+
}

vignettes/types.Rmd

+21-9
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,39 @@ if (!requireNamespace("see", quietly = TRUE) ||
4444

4545
<!-- This is copied from the details section of the documentation of the correlation function, any changes here or there should be SYNCED -->
4646

47-
- **Pearson's correlation**: The covariance of the two variables divided by the product of their standard deviations.
47+
Correlations tests are arguably one of the most commonly used statistical procedures, and are used as a basis in many applications such as exploratory data analysis, structural modelling, data engineering etc. In this context, we present **correlation**, a toolbox for the R language [@Rteam] and part of the [**easystats**](https://github.com/easystats/easystats) collection, focused on correlation analysis. Its goal is to be lightweight, easy to use, and allows for the computation of many different kinds of correlations, such as:
4848

49-
- **Spearman's rank correlation**: A nonparametric measure of rank correlation (statistical dependence between the rankings of two variables). The Spearman correlation between two variables is equal to the Pearson correlation between the rank values of those two variables; while Pearson's correlation assesses linear relationships, Spearman's correlation assesses monotonic relationships (whether linear or not).
49+
- **Pearson's correlation**: This is the most common correlation method. It corresponds to the covariance of the two variables normalized (i.e., divided) by the product of their standard deviations.
5050

51-
- **Kendall's rank correlation**: In the normal case, the Kendall correlation is preferred than the Spearman correlation because of a smaller gross error sensitivity (GES) and a smaller asymptotic variance (AV), making it more robust and more efficient. However, the interpretation of Kendall's tau is less direct than that of Spearman's rho, in the sense that it quantifies the difference between the % of concordant and discordant pairs among all possible pairwise events.
51+
$$r_{xy} = \frac{cov(x,y)}{SD_x \times SD_y}$$
5252

53-
- **Biweight midcorrelation**: A measure of similarity between samples that is median-based, rather than mean-based, thus is less sensitive to outliers, and can be a robust alternative to other similarity metrics, such as Pearson correlation.
53+
- **Spearman's rank correlation**: A non-parametric measure of correlation, the Spearman correlation between two variables is equal to the Pearson correlation between the rank scores of those two variables; while Pearson's correlation assesses linear relationships, Spearman's correlation assesses monotonic relationships (whether linear or not). Confidence Intervals (CI) for Spearman's correlations are computed using the @fieller1957tests correction [see @bishara2017confidence].
5454

55-
- **Distance correlation**: Distance correlation measures both linear and nonlinear association between two random variables or random vectors. This is in contrast to Pearson's correlation, which can only detect linear association between two random variables.
55+
$$r_{s_{xy}} = \frac{cov(rank_x, rank_y)}{SD(rank_x) \times SD(rank_y)}$$
5656

57-
- **Percentage bend correlation**: Introduced by Wilcox (1994), it is based on a down-weight of a specified percentage of marginal observations deviating from the median (by default, 20%).
57+
- **Kendall's rank correlation**: In the normal case, the Kendall correlation is preferred to the Spearman correlation because of a smaller gross error sensitivity (GES) and a smaller asymptotic variance (AV), making it more robust and more efficient. However, the interpretation of Kendall's tau is less direct compared to that of the Spearman's rho, in the sense that it quantifies the difference between the % of concordant and discordant pairs among all possible pairwise events. Confidence Intervals (CI) for Kendall's correlations are computed using the @fieller1957tests correction [see @bishara2017confidence]. For each pair of observations (i ,j) of two variables (x, y), it is defined as follows:
5858

59-
- **Shepherd's Pi correlation**: Equivalent to a Spearman's rank correlation after outliers removal (by means of bootstrapped mahalanobis distance).
59+
$$\tau_{xy} = \frac{2}{n(n-1)}\sum_{i<j}^{}sign(x_i - x_j) \times sign(y_i - y_j)$$
6060

61-
- **Point-Biserial and biserial correlation**: Correlation coefficient used when one variable is continuous and the other is dichotomous (binary). Point-serial is equivalent to a Pearson's correlation, while Biserial should be used when the binary variable is assumed to have an underlying continuity. For example, anxiety level can be measured on a continuous scale, but can be classified dichotomously as high/low.
61+
- **Biweight midcorrelation**: A measure of similarity that is median-based, instead of the traditional mean-based, thus being less sensitive to outliers. It can be used as a robust alternative to other similarity metrics, such as Pearson correlation [@langfelder2012fast].
62+
63+
- **Distance correlation**: Distance correlation measures both linear and non-linear association between two random variables or random vectors. This is in contrast to Pearson's correlation, which can only detect linear association between two random variables.
64+
65+
- **Percentage bend correlation**: Introduced by Wilcox (1994), it is based on a down-weight of a specified percentage of marginal observations deviating from the median (by default, 20 percent).
66+
67+
- **Shepherd's Pi correlation**: Equivalent to a Spearman's rank correlation after outliers removal (by means of bootstrapped Mahalanobis distance).
68+
69+
- **Point-Biserial and biserial correlation**: Correlation coefficient used when one variable is continuous and the other is dichotomous (binary). Point-Biserial is equivalent to a Pearson's correlation, while Biserial should be used when the binary variable is assumed to have an underlying continuity. For example, anxiety level can be measured on a continuous scale, but can be classified dichotomously as high/low.
6270

6371
- **Polychoric correlation**: Correlation between two theorised normally distributed continuous latent variables, from two observed ordinal variables.
6472

6573
- **Tetrachoric correlation**: Special case of the polychoric correlation applicable when both observed variables are dichotomous.
6674

67-
- **Partial correlation**: Correlation between two variables after adjusting for the (linear) the effect of one or more variable. The correlation test is here run after having partialized the dataset, independently from it. In other words, it considers partialization as an independent step generating a different dataset, rather than belonging to the same model. This is why some discrepancies are to be expected for the t- and the p-values (but not the correlation coefficient) compared to other implementations such as `ppcor`.
75+
- **Partial correlation**: Correlation between two variables after adjusting for the (linear) the effect of one or more variables. The correlation test is here run after having partialized the dataset, independently from it. In other words, it considers partialization as an independent step generating a different dataset, rather than belonging to the same model. This is why some discrepancies are to be expected for the *t*- and the *p*-values (but not the correlation coefficient) compared to other implementations such as `ppcor`.
76+
77+
$$r_{xy.z} = r_{e_{x.z},e_{y.z}}$$
78+
79+
*Where $e_{x.z}$ are the residuals from the linear prediction of $x$ by $z$. This can be expanded to a multivariate $z$.*
6880

6981
- **Multilevel correlation**: Multilevel correlations are a special case of partial correlations where the variable to be adjusted for is a factor and is included as a random effect in a mixed model.
7082

0 commit comments

Comments
 (0)