-
Notifications
You must be signed in to change notification settings - Fork 1
/
esci-correlation.html
245 lines (182 loc) · 10.1 KB
/
esci-correlation.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
<!--
Program esci-correlation.html
Author Gordon Moore
Date 20 August 2020
Description A JavaScript implementation of esci See r 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 2020-08-26 #2 Appearance jigs
0.0.3 2020-08-26 #1 Basic correlation. Not all flags implemented yet.
0.0.8
0.0.9 2020-09-02 #5 Changed colours for labels in Display Lines #8 added test data and import.
0.0.10 2020-09-03 #9 Tooltips
0.0.11
0.9.0 2020-09-05 #6 Remove TEST option, set version 0.9.0
1.0.0 2020-09-06 Version 1.0.0
1.1.0 6 Nov 2020 Rationalised into one repository
-->
<!--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-correlation</title>
<!-- stylesheets -->
<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-correlation.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/math.min.js></script> -->
<script src=./js/d3.min.js></script>
<script src=./js/ion.rangeSlider.min.js></script>
<script src=./js/tipped.min.js></script>
<script src=./js/esci-correlation.js></script>
</head>
<body>
<div id=main>
<!----------------------------------Left Panel---------------------------------->
<div id=leftpanel>
<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>correlation</div>
<div id=tooltipsonoff>?</div>
</div>
<div id=breadcrumbs><span id=homecrumb class=hometip data-tooltip>Home></span><span id=distributioncrumb data-tooltip> correlation</span></div>
<div id=panels>
<div id=tab1text data-tooltip>
See data sets all with the same <em>r</em>
</div>
<!-------------------------------------Tab 1 Panels------------------------------------->
<!-----------Tab 1 Panel 1 N------------------------------------------->
<div id=N1panel>
<div id=N1paneltip data-tooltip><span class=red >1 </span><em>N</em></div>
<div id=N1sliderpanel data-tooltip>
<div id=N1sliderdiv><input id=N1slider type=text/></div>
<div><img id=N1nudgebackward class="icons slidericons" src=./images/left.png alt='nudge backwards'></div>
<div><img id=N1nudgeforward class="icons slidericons" src=./images/right.png alt='nudge forward'></div>
<input id=N1val type=text>
</div>
</div>
<!------------Panel 2 Generate dataset with chosen r------------->
<div id=rpanel>
<div id=rpaneltip data-tooltip><span class=red >2 </span><!--<input id=chosenr type=radio name=getdata checked=checked>--> Data set correlation <em>r</em></div>
<div id=rsliderpanel data-tooltip>
<div id=rsliderdiv><input id=rslider type=text/></div>
<div><img id=rnudgebackward class="icons slidericons" src=./images/left.png alt='nudge backwards'></div>
<div><img id=rnudgeforward class="icons slidericons" src=./images/right.png alt='nudge forward'></div>
<input id=rval type=text>
</div>
<div id=calculatedrdiv data-tooltip><em>r</em> of data set <span id=calculatedr class=red>0.5</span></div>
</div>
<!------------Panel 3 New data set------------->
<div id=newdatasetpanel>
<div class=newdatatip data-tooltip><span class=red >3 </span></div>
<div id=newdataset class=newdatatip data-tooltip>New Data Set</div>
<div class=newdatatip data-tooltip>... with correlation <em>r</em></div>
<!-- TEST and IMPORT -->
<!-- <div id=testdiv>Test Data<input id=test type=checkbox></div> -->
</div>
<!------------Panel 4 Display features------------->
<div id=displayfeaturespanel>
<div id=displaytip data-tooltip><span class=red>4</span> Display</div>
<div class=rtip data-tooltip><input id=displayr type=checkbox> Value of <em>r</em> in the figure</div>
<div class=ctmtip data-tooltip><input id=displayctm type=checkbox> Cross through means</div>
<div class=mdtip data-tooltip><input id=displaymd type=checkbox> Marginal distributions</div>
</div>
<!------------Panel 5 Descriptive statistics------------->
<div id=displaystatistics1spanel>
<div id=descstatstip data-tooltip><span class=red>5</span> Descriptive statistics <input id=statistics1show type=checkbox></div>
<div id=statistics1>
<div></div>
<div id=labelx><em>X</em></div>
<div id=labely><em>Y</em></div>
<div class=statslabel>Mean</div>
<div id=m1 class='red pushright'>0</div>
<div id=m2 class='red pushright'>0</div>
<div class=statslabel>SD</div>
<div id=s1 class='red pushright'>0</div>
<div id=s2 class='red pushright'>0</div>
</div>
</div>
<!------------Panel 6 Display Lines------------->
<div id=displaylines1panel>
<div id=displaylinestip data-tooltip><span class=red>6</span> Display lines <input id=displaylines1show type=checkbox></div>
<div id=displaylines1>
<div><input id=corryx class=yxtip data-tooltip type=checkbox> <span data-tooltip class='blue yxtip'><em>Y</em> against <em>X</em></span> <span id=corryxvallabel class=slopeyxtip data-tooltip >Slope</span> <span id=corryxval data-tooltip class='red slopeyxtip'>0.0</span></div>
<div><input id=corrxy class=xytip data-tooltip type=checkbox> <span data-tooltip class='red xytip'><em>X</em> against <em>Y</em></span> <span id=corrxyvallabel class=slopexytip data-tooltip>Slope</span> <span id=corrxyval data-tooltip class='red slopexytip'>0.0</span></div>
<div><input id=corrlineslope class=cltip data-tooltip type=checkbox> <span data-tooltip class='black cltip'>Correlation line</span> <span id=corrlineslopevallabel class=slopecltip data-tooltip>Slope</span> <span id=corrlineslopeval data-tooltip class='red slopecltip'>0.0</span></div>
</div>
</div>
<!------------Panel x Display Information Panel------------->
<div id=displayinfopaneldiv>
<div id=displayinfopaneltitle>Covariance matrix</div>
<div id=covmatrixpanel>
<div>| <span id=covxx>0</span><span id=spacer> </span><span id=covxy>0</span> |</div>
<div>| <span id=covyx>0</span><span id=spacer> </span><span id=covyy>0</span> |</div>
</div>
<div id=displayinfopaneltitle>Eigenvalues and eigenvectors</div>
<div id=displayinfopanel>
<div >λ<sub>1 </sub><span id=lambda1>0</span></div>
<div>
<div id=eignenvector1x>|<span id=x1>1.00</span>|</div>
<div id=eignenvector1y>|<span id=y1>0</span>|</div>
</div>
<div id=space></div><div></div>
<div >λ<sub>2 </sub><span id=lambda2>0</span></div>
<div>
<div id=eignenvector2x>|<span id=x2>1.00</span>|</div>
<div id=eignenvector2y>|<span id=y2>0</span>|</div>
</div>
</div>
</div>
<!------------Panel x Load test data Panel------------->
<div id=loadtestdatapanel>
<!--------Clear and load Data ----------------------------------------->
<div class=cleardatapanelwrapper>
<div class=cleardatapanel>
<div id=cleardata class=clearbutton>Clear Data?</div>
<div id=cleardatayes class=clearbutton>Yes</div>
<div id=cleardatano class=clearbutton>No</div>
<div id=loaddata class=loadbutton>Load Data</div>
</div>
<div id=datasetdiv><input id=dataset class=inputfile type=file accept=".csv"></div>
</div>
<!-- data-->
<div id=middlepanel class=middlepanel>
<div id=data>
<!-- <div class=grouplabels><em>X</em></div>
<div class=grouplabels><em>Y</em></div> -->
<input type=text id=group1label class=grouptext value=''>
<input type=text id=group2label class=grouptext value=''>
</div>
</div>
<div id=confidenceellipsediv><input id=confidenceellipse type=checkbox><!--90% Confidence ellipse--></div>
</div>
</div>
<!---------------------------------Footer---------------------------------------------->
<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>
<!------------------------------------------------------------------------------------->
</div>
</body>
</html>