-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
208 lines (181 loc) · 10.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Effect size converter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="author" content="Hause Lin">
<meta name="description" content="Effect size converter/calculator to convert between common effect sizes used in research.">
<link rel="stylesheet" href="./public/bootstrap.css" media="screen">
<link rel="stylesheet" href="./public/custom.css">
<script type="text/javascript" src="esconvert.js"></script>
<link rel="icon" href="https://raw.githubusercontent.com/hauselin/esconvert/gh-pages/favicon.png">
<!-- math jax -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<!-- mathjs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/7.2.0/math.min.js"></script>
<script data-name="BMC-Widget" src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js" data-id="hauselin" data-description="Support me by buying me tea!" data-message="Thank you for visiting. You can buy me tea!" data-color="#79D6B5" data-position="left" data-x_margin="18" data-y_margin="18"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-134721506-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-134721506-4');
</script>
</head>
<body data-gr-c-s-loaded="true" class="vsc-initialized">
<div class="navbar navbar-expand-lg fixed-top navbar-light bg-light">
<div class="container"><a href="#" class="navbar-brand"><img src="https://raw.githubusercontent.com/hauselin/esconvert/gh-pages/favicon.png" alt="histogram" width="25" style="border-radius: 8px;"> Effect size converter</a></div>
</div>
<div class="container" #id="first-line">
<div class="page-header" id="banner">
<div class="row">
<div class="col-lg-12">
<h2>Convert between different effect sizes</h2>
<p class="lead">By convention, Cohen's <em>d</em> of 0.2, 0.5, 0.8 are considered small, medium and large effect sizes respectively.</p>
</div>
</div>
</div>
<!-- table to convert text value -->
<!-- https://stackoverflow.com/questions/38799096/clear-input-fields-on-page-refresh-microsoft-edge -->
<div class="row">
<div class="col-lg-5">
<table class="table table-hover">
<tbody>
<tr>
<th scope="row">Cohen's <em>d</em></th>
<td><input id="cohend" class="form-control" autocomplete="off" type="number" value="0.300" step="0.01" size="15" onchange="es_d(this.value)"></td>
</tr>
<tr>
<th scope="row">Pearson's correlation <em>r</em></th>
<td><input id="pearsonr" class="form-control" autocomplete="off" type="number" value="0.148" step="0.01" size="15" onchange="es_r(this.value)"></td>
</tr>
<tr>
<th scope="row">R-squared</th>
<td><input id="r2" class="form-control" autocomplete="off" type="number" value="0.022" min="0" step="0.01" size="15" onchange="es_r2(this.value)"></td>
</tr>
<tr>
<th scope="row">Cohen's <em>f</em></th>
<td><input id="cohenf" class="form-control" autocomplete="off" type="number" value="0.150" step="0.01" size="15" onchange="es_f(this.value)"></td>
</tr>
<tr>
<th scope="row">Odds ratio (OR)</th>
<td><input id="oddsratio" class="form-control" autocomplete="off" type="number" min="0" value="1.723" step="0.01" size="15" onchange="es_or(this.value)"></td>
</tr>
<tr>
<th scope="row">Log odds ratio</th>
<td><input id="log-odds-ratio" class="form-control" autocomplete="off" type="number" value="0.544" step="0.01" size="15" onchange="es_logor(this.value)"></td>
</tr>
<tr>
<th scope="row">Area-under-curve (AUC)<div class="tooltip2">*<span class="tooltiptext2">common language effect size statistic</span></div>
</th>
<td><input id="auc" class="form-control" autocomplete="off" type="number" value="0.584" step="0.01" size="15" onchange="es_auc(this.value)"></td>
</tr>
<tr>
<th scope="row">Fisher's <em>z</em> (<em>z</em>')</th>
<td><input id="fisherz" class="form-control" autocomplete="off" type="number" value="0.149" step="0.01" size="15" onchange="es_fisherz(this.value)"></td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- add horizontal line -->
<!-- <hr class="my-4"> -->
<div class="row">
<div class="col-lg-12">
<h3>Conversion formulae</h3>
<p>All conversions assume equal-sample-size groups.</p>
</div>
</div>
<!-- add formulae -->
<div class="row">
<!-- col 1 -->
<div class="col-lg-4">
<div class="card">
<div class="card-body" style="height:140px">
<h5 class="card-title">Cohen's <em>d</em> to Pearson's <em>r </em><sup><a href="#footnote-1">1</sup></a></h5>
<p class="card-text">$$ r = {d \over \sqrt{d^2 + 4}} $$</p>
</div>
</div>
<div class="card">
<div class="card-body" style="height:140px">
<h5 class="card-title">Cohen's <em>d</em> to <em>area-under-curve (auc) </em><sup><a href="#footnote-1">1</sup></a></h5>
<p class="card-text">$$\text{auc} = {\phi { d \over \sqrt{2}}} $$</p>
<h6 class="card-subtitle mb-2 text-muted">\(\phi\): normal cumulative distribution function</h6>
<h6 class="card-subtitle mb-2 text-muted">R code: pnorm(d/sqrt(2), 0, 1)</h6>
</div>
</div>
</div>
<!-- col 2 -->
<div class="col-lg-4">
<div class="card">
<div class="card-body" style="height:140px">
<h5 class="card-title">Cohen's <em>d</em> to Cohen's <em>f </em><sup><a href="#footnote-2">2</sup></a></h5>
<p class="card-text">$$ f = {d \over \ 2} $$</p>
</div>
</div>
<div class="card">
<div class="card-body" style="height:140px">
<h5 class="card-title">Correlation <em>r</em> Fisher's <em>z </em><sup><a href="#footnote-1">4</sup></a></h5>
<p class="card-text">$$ z' = 0.5 * (log(1 + r) - log(1 - r)) $$</p>
</div>
</div>
</div>
<!-- col 3 -->
<div class="col-lg-4">
<div class="card">
<div class="card">
<div class="card-body" style="height:140px">
<h5 class="card-title">Cohen's <em>d</em> to <em>log odds ratio </em><sup><a href="#footnote-3">3</sup></a></h5>
<p class="card-text">$$ \text{log odds ratio} = {d \pi \over \sqrt{3}} $$</p>
</div>
</div>
</div>
</div>
</div>
<!-- add horizontal line -->
<hr class="my-4">
<div class="row">
<div class="col-lg-12">
<h2>References</h2>
<p id="footnote-1">1. Ruscio, J. (2008). A probability-based measure of effect size: Robustness to base rates and other factors. Psychological Methods, 13(1), 19-30. doi:10.1037/1082-989x.13.1.19</p>
<p id="footnote-2">2. Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.), Hillsdale, NJ: Erlbaum.</p>
<p id="footnote-3">3. Sánchez-Meca, J., Marín-Martínez, F., & Chacón-Moscoso, S. (2003). Effect-size indices for dichotomized outcomes in meta-analysis. Psychological Methods, 8(4), 448-467.
<p id="footnote-4">4. <a href="https://en.wikipedia.org/wiki/Fisher_transformation">Wikipedia: Fisher's z-transformation of r</a></p>
<p>5. Borenstein, M., Hedges, L. V., Higgins, J. P. T., & Rothstein, H. R. (2009). Introduction to meta-analysis. Chichester, West Sussex, UK: Wiley.</p>
<p>6. Rosenthal, R. (1994). Parametric measures of effect size. In H. Cooper & L. V. Hedges (Eds.), The Handbook of Research Synthesis. New York, NY: Sage.</p>
<p></p>
</div>
</div>
<!-- clicky analytics -->
<script>var clicky_site_ids = clicky_site_ids || []; clicky_site_ids.push(101275795);</script>
<script async src="//static.getclicky.com/js"></script>
<noscript>
<p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/101275795ns.gif" /></p>
</noscript>
<!-- footer -->
<footer id="footer">
<div class="row">
<div class="col-lg-12">
<ul class="list-unstyled">
<li class="float-lg-right"><a href="#top">Back to top</a></li>
<li><a href="https://twitter.com/hauselin">Twitter</a></li>
<li><a href="https://github.com/hauselin/esconvert">GitHub</a></li>
<li><a href="https://www.buymeacoffee.com/hauselin">Donate</a></li>
<li><a href="http://clicky.com/10127579">Clicky analytics</a></li>
</ul>
<p>Made by <a href="https://www.hauselin.com">Hause Lin</a>. Code released under the <a href="https://github.com/thomaspark/bootswatch/blob/master/LICENSE">MIT License</a>.</p>
<p>Based on <a href="https://getbootstrap.com/" rel="nofollow">Bootstrap</a>. Equations rendered by <a href="https://www.mathjax.org/" rel="nofollow">MathJax</a>. Web fonts from <a href="https://fonts.google.com/" rel="nofollow">Google</a>.</p>
</div>
</div>
</footer>
<!-- <script src="/public/jquery.js" type="text/javascript"></script> -->
<!-- <script src="/public/popper.js" type="text/javascript"></script> -->
<!-- <script src="/public/bootstrap.js" type="text/javascript"></script> -->
<!-- <script src="/public/custom.js" type="text/javascript"></script> -->
</div>
</body>
</html>