PageSourceSearch

https://openmetaanalysis.github.io/voting/

html openmetaanalysis.github.io collected 2026-10-03 09:43:15 UTC 6,293 bytes, 195 lines download raw bytes

1<!DOCTYPE html>
2<html lang="en">
3<head>
4    <title>openMetaAnalysis: Vote counting with the Binomial Test and Wilson CI Calculator</title>
5<meta name="viewport" content="width=device-width, initial-scale=1.0">
6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7<script src="https://cdn.jsdelivr.net/npm/jstat@latest/dist/jstat.min.js"></script>
7
8<style>
9
10.container
11{
12margin-top: 0px;
13margin-right: auto;
14margin-bottom: 0px;
15margin-left: auto;
16}
17
18//Menu from http://codepen.io/philhoyt/pen/ujHzd
19#primary_nav_wrap
20{
21	margin-top:15px
22}
23
24#primary_nav_wrap ul
25{
26	list-style:none;
27	position:relative;
28	float:left;
29	margin:0;
30	padding:0
31}
32
33#primary_nav_wrap ul a
34{
35	display:block;
36	background-color:#6DC6E7;
37	color:#FFFFFF;
38	text-decoration:none;
39	font-weight:bold;
40	//font-weight:700;
41	//font-size:12px;
42	line-height:32px;
43	padding:0 15px;
44	//font-family:"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif
45}
46
47#primary_nav_wrap ul li
48{
49	position:relative;
50	float:left;
51	margin:0;
52	padding:0
53}
54
55#primary_nav_wrap ul li.current-menu-item
56{
57	background:#0022B4;
58		color:#FFFFFF;
59}
60
61#primary_nav_wrap ul a:hover
62{
63	background:#0022B4;
64		color:#FFFFFF;
65}
66
67#primary_nav_wrap ul ul
68{
69	display:none;
70	position:absolute;
71	top:100%;
72	left:0;
73	background-color:#6DC6E7;
74	color:#FFFFFF;
75	padding:0
76}
77
78#primary_nav_wrap ul ul li
79{
80	float:none;
81	width:200px
82}
83
84#primary_nav_wrap ul ul a
85{
86	line-height:120%;
87	padding:10px 15px;
88}
89
90#primary_nav_wrap ul ul ul
91{
92	top:0;
93	left:100%
94}
95
96#primary_nav_wrap ul li:hover > ul
97{
98	display:block
99}
100</style>
101</head>
102
103<body>
104<!-- 
105http://jquery-csv.googlecode.com/git/examples/basic-usage.html
106http://jquery-csv.googlecode.com/git/examples/flot.html -> seems best and most stable without reticulating spines error
107http://code.google.com/p/jquery-csv/wiki/API -> instructions
108-->
109  <div class="container" style="width:860px;">
110
111    <div class="page-header">
112      <div style="color:#0022B4">
113	  <h1>openMetaAnalysis: <span style="font-size:50%">collaborative and continuous</span></h1>
114	  </div>
115
116<nav id="primary_nav_wrap">
117<ul id="menu">
118<li><a href="http://openmetaanalysis.github.io/" class="menuitem">Home</a></li>
119<li><a href="#" class="menuitem">Plot editors</a>
120	<ul>
121	<li><a href="https://openmetaanalysis.ocpu.io/home/www/editor.html" class="menuitem">Intervention</a></li>
122	<li><a href="https://openmetaanalysis.ocpu.io/home/www/editor-dx.html" class="menuitem">Diagnosis</a></li>
123	<li><a href="https://openmetaanalysis.github.io/arrows_plot/" class="menuitem">Arrows plot</a></li>
124 	<li><a href="https://openmetaanalysis.github.io/votinb/" class="menuitem">Vote counting</a></li>
125	</ul>
126</li>
127<li><a href="http://openmetaanalysis.github.io/methods.html" class="menuitem">Methods</a></li>
128<li><a href="http://openmetaanalysis.github.io/new.html" class="menuitem">Create a new review</a></li>
129<li><a href="http://openmetaanalysis.github.io/update.html" class="menuitem">Improve/update an existing review</a></li>
130</ul>
131</nav>
132<div style="clear:both">&nbsp;</div>
133
134	<div><span style="font-weight:bold">Vote counting:</span></div> 
135	<div>&nbsp;</div>
136<h3>Vote Counting with the Binomial Test and Wilson Confidence Interval Calculator</h3>
137
138<label for="successes">Successes:</label>
139<input type="number" id="successes"s value="10" min="0"><br>
140
141<label for="trials">Trials:</label>
142<input type="number" id="trials" value="12" min="1"><br><br>
143	<div>Replace these values with yours. Per the Cochrane reference below, "For each study, the effect is categorized as beneficial or harmful based on the direction of effect" (eg, statistical significance is not required)</div>
144      <div>Suggested summary of the results as stated by the Cochrane (reference below): "‘There was evidence that midwife-led models of care had an effect on satisfaction, with 10 of 12 studies favouring the intervention (83% (95% CI 55% to 95%), P = 0.039)"</div>
145<button onclick="calculateCI()">Calculate</button>
146
147<p id="output"></p>
148
149<script>
150function calculateCI() {
151    const successes = parseInt(document.getElementById('successes').value);
152    const trials = parseInt(document.getElementById('trials').value);
153    const alpha = 0.05;
154
155    // Exact binomial (Clopper-Pearson)
156    const lowerExact = jStat.beta.inv(alpha / 2, successes, trials - successes + 1);
157    const upperExact = jStat.beta.inv(1 - alpha / 2, successes + 1, trials - successes);
158
159    // Wilson Score interval
160    const z = jStat.normal.inv(1 - alpha / 2, 0, 1);
161    const p = successes / trials;
162    const denominator = 1 + (z * z / trials);
163    const centreAdjustedProb = p + (z * z / (2 * trials));
164    const adjustedStdError = Math.sqrt((p * (1 - p) + z * z / (4 * trials)) / trials);
165
166    const lowerWilson = (centreAdjustedProb - z * adjustedStdError) / denominator;
167    const upperWilson = (centreAdjustedProb + z * adjustedStdError) / denominator;
168
169    // Binomial exact p-value (two-sided)
170    const pValue = 2 * Math.min(
171        jStat.binomial.cdf(successes, trials, 0.5),
172        1 - jStat.binomial.cdf(successes - 1, trials, 0.5)
173    );
174
175    // Output results
176    const result = `<strong>Exact Binomial (Clopper-Pearson) CI:</strong> ${(lowerExact * 100).toFixed(1)}% to ${(upperExact * 100).toFixed(1)}%<br>
177                    <strong>Wilson Score CI:</strong> ${(lowerWilson * 100).toFixed(1)}% to ${(upperWilson * 100).toFixed(1)}% (used by the Cochrane Collaboration in <a href=\"https://training.cochrane.org/handbook/current/chapter-12#_Ref524789667\">their example</a>)<br>
178                    <strong>Exact Binomial P-value:</strong> ${pValue.toFixed(3)}`;
179
180    document.getElementById('output').innerHTML = result;
181}
182
183// Initial calculation
184calculateCI();
185</script>
185
186	    
187<h3>References</h3>
188<div>
189<ol>
190<li>McKenzie JE, Brennan SE. <a href="https://training.cochrane.org/handbook/current/chapter-12#_Ref524789667">Chapter 12: Synthesizing and presenting findings using other methods</a> [last updated October 2019]. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.5. Cochrane, 2024.</li>
191<li>Boon. The effect directon plot revisited. Res Synth Methods. 2020. DOI: <a href="https://doi.org/10.1002/jrsm.1458">10.1002/jrsm.1458</a></li>
192</ol>
193</div>
194</body>
195</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.