-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
129 lines (125 loc) · 4.48 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>PowerAnalyses.org</title>
<link rel="stylesheet" href="/style.css">
<link rel="icon" href="/favicon.png">
<script src="pa.js"></script>
<script defer src="frontend.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
</head>
<body>
<div class="content">
<div class="title center">
<img class="favicon" src="/favicon.png" />
PowerAnalyses.org Beta
</div>
<img class="plot center" src=""></img>
<div class="dropdowns border">
<label for="family">
Test family:<br>
<select class="drop-down" id="family" onchange="familyChanged()" name="type">
<option disabled value="exact">Exact</option>
<option value="f">F tests</option>
<option value="t">t tests</option>
<option value="chi">χ² tests</option>
<option disabled value="z">z tests</option>
</select><br>
</label>
<label for="test">
Statistical test:<br>
<select class="drop-down" id="test" onchange="updateNumberOutputAreas()" name="type">
<option value="1">ANCOVA - Fixed effects, main effects, and interactions</option>
</select><br>
</label>
<label for="analysis">
Type of power analysis:<br>
<select class="drop-down" id="analysis" onchange="updateNumberOutputAreas()" name="type">
<option value="n">Compute required sample size (a priori)</option>
<option value="alpha">Compute required α (criterion)</option>
<option value="power">Compute achieved power (post hoc)</option>
<option value="es">Compute required effect size (sensitivity)</option>
</select>
</label>
<br>
<br>
</div>
<div class="numbers">
<div>
<table id="input" class="border">
<tr>
<td>Tail:</td>
<td>
<select id="tail">
<option value="1">One tail</option>
<option value="2">Two tails</option>
</select>
</td>
</tr>
</table>
<div class="output border">
<table id="output" class="center">
<tbody class="center">
<tr>
<td>Sample size:</td>
<td class="result">
<input id="n" type="number" value="100" min="2" max="99999" step="5" onchange="updateOutput()"
disabled>
</td>
</tr>
<tr>
<td>α err prob:</td>
<td class="result">
<input id="alpha" type="number" value="0.05" min="0.01" max="0.99" step="0.01"
onchange="updateOutput()">
</td>
</tr>
<tr>
<td>Power (1-β err prob):</td>
<td class="result">
<input id="power" type="number" value="0.95" min="0" max="0.99" step="0.01" onchange="updateOutput()">
</td>
</tr>
<tr>
<td>Effect size:</td>
<td class="result">
<input id="es" type="number" value="0.5" min="0" max="100" step="0.05" onchange="updateOutput()">
</td>
</tr>
</tbody>
</table>
<div id="error" class="center error">
</div>
<div class="center">
<button onclick="resetOutput()" class="resetBtn">Reset</button>
<button onclick="updateOutput()" class="calculateBtn">Calculate</button>
</div>
</div>
</div>
</div>
<br>
<br>
<br>
<div style="font-size: 1rem">
<center><b>Why this web site?</b></center><br>
Statistical power analyses play a key role in science.
However, the code for these tools isn't always public.
This project shares the code along with the tool, so that people can verify the code and improve it.
</div>
<br>
<br>
<br>
<div class="center footer">
PowerAnalyses.org version <VERSION>.
If you find a bug, please open an issue on <a
href="https://github.com/poweranalyses-org/poweranalyses">GitHub</a>.
This site was made possible thanks to the
<a
href="https://www.psychologie.hhu.de/arbeitsgruppen/allgemeine-psychologie-und-arbeitspsychologie/gpower.html">G*Power</a>
and
<a href="https://github.com/heliosdrm/pwr">pwr</a> projects.
</div>
</div>
</body>
</html>