-
Notifications
You must be signed in to change notification settings - Fork 1
/
esci-precision.html
299 lines (229 loc) · 14.7 KB
/
esci-precision.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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<!--
Program esci-precision.html
Author Gordon Moore
Date 20 August 2020
Description A JavaScript implementation of esci precision for planning for unpaired and paired data for Introduction to the New Statistics by Geoff Cumming and Robert Calin-Jageman
Licence GNU General Public LIcence Version 3, 29 June 2007
-->
<!-- #region version history-->
<!--
0.0.1 Initial version
0.0.2 21 Oct 2020 #2 Some development
0.0.3 21 Oct 2020 #2 More development and trying to figure out calcs!!! :(
0.0.5 22 Oct 2020 #2 More investigation into formulae, in development.
0.0.8
0.1.0 26 Oct 2020 Basic dev finished, now start tweaking and checking.
0.1.3
0.1.4 28 Oct 2020 #6 Added a missed maximum to dt for Paired assurance calcs, Added temp radio button for type of calc
0.1.11
0.1.12 2 Nov 2020 #8 Tooltips added
0.1.13
0.1.14 3 Nov 2020 #8 Tooltips edited
0.1.15
0.1.16 3 Nov 2020 #3 Temporary display of 99th percentile
0.1.20
0.1.21 5 Nov 2020 #12 Grid lines initially on and tooltip change
0.1.22 6 Nov 2020 #12 Change text in panel3/4
1.1.0 6 Nov 2020 Rationalised into one repository
1.1.3 13 Nov 2020 #11 Remove italic from rho symbol in html
1.1.4 16 Nov 2020 #10 Add confidence intervals dropdown and change TargetMoe increment to 0.01
1.1.5
1.1.6 17 Nov 2020 #10 Reposition CI dropdown etc
1.1.7 18 Nov 2020 #10 Adjustment in text panel 1
-->
<!--endregion -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<!-- <meta name="viewport" content="width=device-width"> not work? allow touch and click to be the same -->
<!--to fix issue of android chrome reducing font size to tiny (unless big paragraph of text) -->
<meta name="HandheldFriendly" content="true"/>
<!--might need this at some point?, though it disables pinch zoom-->
<!--<meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=yes">-->
<!--clear favicon cache-->
<link rel="shortcut icon" href="./favicon.ico?v=2">
<title>esci-web pecision</title>
<!-- stylesheets -->
<link href=./css/smart_tab_esci.css rel=stylesheet type=text/css>
<link href=./css/ion.rangeSlider.css rel=stylesheet type=text/css>
<link href=./css/tipped.css rel=stylesheet type=text/css />
<link href=./css/esci.css rel=stylesheet type=text/css>
<link href=./css/esci-precision.css rel=stylesheet type=text/css>
<!-- scripts -->
<script src=./js/jquery-3.5.1.min.js></script>
<script src=./js/jstat.min.js></script>
<script src=./js/d3.min.js></script>
<script src=./js/jquery.smartTab.min.js></script>
<script src=./js/ion.rangeSlider.min.js></script>
<script src=./js/tipped.min.js></script>
<script src=./js/esci-precision.js defer></script>
</head>
<body>
<div id=main2>
<!-------------------------------------Left panel---------------------------------------------->
<div id=leftpanel>
<!----------------------------------Main heading---------------------------------->
<div id=header>
<div id=logo><img id=logoimg src=./images/logo.png></div>
<div id=mainheading class=headingtip data-tooltip>esci web</div>
<div id=subheading class=headingtip data-tooltip>precision for planning</div>
<div id=tooltipsonoff>?</div>
</div>
<div id=breadcrumbs><span id=homecrumb class=hometip data-tooltip>Home></span><span id=distributioncrumb>precision for planning</span></div>
<div id=tab1text data-tooltip>
Find the smallest <em>N</em> that will give a CI with MoE no more than chosen target MoE, either on average, or with 99% assurance
</div>
<!---------------------------------Set up tabs------------------------------------------------->
<div id="smarttab">
<ul class="nav">
<li class=tab1tip data-tooltip>
<a class="nav-link" href="#tab-1">Two Independent Groups</a>
</li>
<li class=tab2tip data-tooltip>
<a class="nav-link" href="#tab-2">Paired Design</a>
</li>
</ul>
<div class="tab-content">
<!-------------------------------------Unpaired data tab----------------------------------------->
<div id="tab-1" class="tab-pane" role="tabpanel">
<div id=unpairedpanels>
<!-------------------------------------Tab 1 Panel 1 Target MoE Unpaired----------------------------------------->
<div id=targetmoeudpanel>
<div class=font18><span class='red targettip' data-tooltip>1 </span> <span><span class=targettip data-tooltip>Target MoE of</span>
<select id=CIud class=copcnttip data-tooltip>
<option value=0.5>50%</option>
<option value=0.32>68%</option>
<option value=0.2>80%</option>
<option value=0.1>90%</option>
<option value=0.05 selected>95%</option>
<option value=0.02>98%</option>
<option value=0.01>99%</option>
<option value=0.002>99.8%</option>
<option value=0.001>99.9%</option>
</select>
<span class=copcnttip data-tooltip>CI is </span> </span><span id=ciud data-tooltip class=backcolour>0.0</span></div>
<div class='font15 targettip' data-tooltip>...set by slider below figure</div>
</div>
<!-------------------------------------Tab 1 Panel 2 N Curves Unpaired----------------------------------------->
<div id=ncurvesudpanel>
<div class='font18 ncurvestip' data-tooltip><span class='red ncurves' data-tooltip>2 </span><em>N</em> curves</div>
<div class='font16 ncaveragetip' data-tooltip><input id=ncurveudavg type=radio name=ncurveud checked=checked><em>N</em> curve for target MoE, <span class=small1><strong>on average</strong></span></div>
<div class='font16 ncassurancetip' data-tooltip><input id=ncurveudass type=radio name=ncurveud><em>N</em> curve for target MoE, <span class=small1><strong>with 99%</strong></span></div>
<div id=asstext class='small1 ncassurancetip' data-tooltip><strong>assurance</strong></div>
</div>
<!-------------------------------------Tab 1 Panel 3 N Display Features Unpaired----------------------------------------->
<div id=displayvaluesudpanel>
<div class='font18 dispvalsheadertip' data-tooltip><span class=red>3 </span>Display features</div>
<div id=displayudpanel>
<div class='font16 dispvalstip' data-tooltip>Display all <em>N</em> values <input id=displayvaluesud type=checkbox></div>
<div class='font16 dispgridlinestip' data-tooltip>Gridlines <input id=displaygridlinesud type=checkbox checked=checked></div>
</div>
</div>
<!-------------------------------------Tab 1 Panel 4 Truncate display Unpaired----------------------------------------->
<div id=truncatedisplayudpanel>
<div class='font18 truncatetip' data-tooltip><span class=red>4 </span>Truncate display at target MoE of </div>
<div id=truncatedisplayudsliderpanel>
<div id=truncatedisplayudsliderdiv class=truncateslidertip data-tooltip><input id=truncatedisplayudslider type=text/></div>
<div class=truncateslidertip data-tooltip><img id=truncatedisplayudnudgebackward class="icons slidericons" src=./images/left.png alt='nudge backwards'></div>
<div class=truncateslidertip data-tooltip><img id=truncatedisplayudnudgeforward class="icons slidericons" src=./images/right.png alt='nudge forward'></div>
<input id=truncatedisplayudval type=text class=truncatevaltip data-tooltip>
</div>
</div>
</div>
</div>
<!-------------------------------------Paired data tab----------------------------------------->
<div id="tab-2" class="tab-pane" role="tabpane1">
<div id=pairedpanels>
<!-------------------------------------Tab 2 Panel 1 Target MoE Paired----------------------------------------->
<div id=targetmoepdpanel>
<div class=font18><span class='red targettip' data-tooltip>1 </span><span><span class=targettip data-tooltip>Target MoE of </span>
<select id=CIpd class=copcnttip data-tooltip>
<option value=0.5>50%</option>
<option value=0.32>68%</option>
<option value=0.2>80%</option>
<option value=0.1>90%</option>
<option value=0.05 selected>95%</option>
<option value=0.02>98%</option>
<option value=0.01>99%</option>
<option value=0.002>99.8%</option>
<option value=0.001>99.9%</option>
</select>
<span class=copcnttip data-tooltip>CI is </span> </span><span id=cipd class=backcolour>0.0</span></div>
<div class='font15 targettip' data-tooltip>...set by slider below figure</div>
</div>
<!-------------------------------------Tab 2 Panel 2 Population correlation Paired----------------------------------------->
<div id=populationcorrelationpanel>
<div class='font18 correltip' data-tooltip><span class=red>2 </span>Population correlation</div>
<div id=correlationrhosliderpanel>
<div id=correlationrhotitle class='font16 correllabeltip' data-tooltip>Correlation ρ</div>
<div id=correlationrhosliderdiv class=correlslidertip data-tooltip><input id=correlationrhoslider type=text/></div>
<div class=correlslidertip data-tooltip><img id=correlationrhonudgebackward class="icons slidericons" src=./images/left.png alt='nudge backwards'></div>
<div class=correlslidertip data-tooltip><img id=correlationrhonudgeforward class="icons slidericons" src=./images/right.png alt='nudge forward'></div>
<input id=correlationrhoval type=text class=correlvaltip data-tooltip>
</div>
</div>
<!-------------------------------------Tab 2 Panel 3 N Curves Paired----------------------------------------->
<div id=ncurvespdpanel>
<div class='font18 ncurvestip' data-tooltip><span class=red>3 </span><em>N</em> curves</div>
<div class='font16 ncaveragetip' data-tooltip><input id=ncurvepdavg type=radio name=ncurvepd checked=checked><em>N</em> curve for target MoE, <span class=small1><strong>on average</strong></span></div>
<div class='font16 ncassurancetip'><input id=ncurvepdass type=radio name=ncurvepd><em>N</em> curve for target MoE, <span class=small1><strong>with 99%</strong></span></div>
<div id=asstext class='small1 ncassurancetip' data-tooltip><strong>assurance</strong></div>
</div>
<!-------------------------------------Tab 2 Panel 4 N Display features Paired----------------------------------------->
<div id=displayvaluespdpanel>
<div class='font18 dispvalsheadertip' data-tooltip><span class=red>4 </span>Display features</div>
<div id=displaypdpanel>
<div class='font16 dispvalstip' data-tooltip>Display all <em>N</em> values <input id=displayvaluespd type=checkbox></div>
<div class='font16 dispgridlinestip' data-tooltip>Gridlines <input id=displaygridlinespd type=checkbox checked=checked></div>
</div>
</div>
<!-------------------------------------Tab 2 Panel 5 Truncate display Paired----------------------------------------->
<div id=truncatedisplaypdpanel>
<div class='font18 truncatetip' data-tooltip><span class=red>5 </span>Truncate display at target MoE of </div>
<div id=truncatedisplaypdsliderpanel>
<div id=truncatedisplaypdsliderdiv class=truncateslidertip data-tooltip><input id=truncatedisplaypdslider type=text/></div>
<div class=truncateslidertip data-tooltip><img id=truncatedisplaypdnudgebackward class="icons slidericons" src=./images/left.png alt='nudge backwards'></div>
<div class=truncateslidertip data-tooltip><img id=truncatedisplaypdnudgeforward class="icons slidericons" src=./images/right.png alt='nudge forward'></div>
<input id=truncatedisplaypdval type=text class=truncatevaltip data-tooltip>
</div>
</div>
</div>
</div>
</div>
</div>
<!---------------------------------Footer---------------------------------------------->
<!--Temporary radio buttons for choosing calculations-->
<!-- <div id=calcs>
<div class=font16><input type=radio name=calctype value=iterate checked=checked>Iterate</div>
<div class=font16><input type=radio name=calctype value=excel>Excel</div>
<div class=font16><input type=radio name=calctype value=sledgehammer>Sledgehammer</div>
</div> -->
<div id=footer>
<div id=footerlink data-tooltip>Click to return to the New Statistics site</div>
</div>
</div>
<!-------------------------------------Right panel---------------------------------------------->
<div id=rightpanel>
<div id=display></div>
<div id=targetmoesliderpanel>
<div id=targetmoetitle>Set target MoE</div>
<div id=targetmoesliderdiv><input id=targetmoeslider type=text/></div>
<div><img id=targetmoenudgebackward class="icons slidericons" src=./images/left.png alt='nudge backwards'></div>
<div><img id=targetmoenudgeforward class="icons slidericons" src=./images/right.png alt='nudge forward'></div>
</div>
</div>
</div>
<!--99th percentile-->
<!-- <div id=P99>
<div>99th percentile</div>
<div></div>
<div>MoE</div>
<div>RCum</div>
<div id=moea>0</div>
<div id=rcuma>0</div>
<div id=moeb>0</div>
<div id=rcumb>0</div>
</div> -->
</body>
</html>