UNPKG

2.88 kBMarkdownView Raw
1# EBMStats
2
3A JavaScript port of the statistics calculator maintained by the Knowledge Translation Program at St. Michael’s Hospital.
4
5The original calculator was designed as a supplementary tool for the book *Evidence-Based Medicine: How to practice and teach it* by Straus, Richardson, Glasziou, & Haynes.
6
7The statistics calculator was created for your own personal use and testing purposes. It is to be used as a guide only. Medical decisions should not be based solely on the results of this program. Although this program has been tested, the accuracy of the information cannot be guaranteed.
8
9© St. Michael’s Hospital
10
11## How to install
12
13```
14npm install ebmstats --save
15```
16
17## How to use
18
19### Diagnostic Test
20
21The diagnostic test accepts the following JSON object:
22
23```
24var testValues = {
25 "testPositiveDisease":1,
26 "testPositiveNoDisease":2,
27 "testNegativeDisease":3,
28 "testNegativeNoDisease":4
29}
30```
31Calling
32```
33ebmstats.getDiagnosticTest(testValues);
34```
35Returns
36```
37{
38 "graph":true,
39 "sensitivity":0.333,
40 "sensitivityLowerLimit":0.061,
41 "sensitivityUpperLimit":0.792,
42 "specificity":0.571,
43 "specificityLowerLimit":0.25,
44 "specificityUpperLimit":0.842,
45 "ppv":0.25,
46 "ppvLowerLimit":0.046,
47 "ppvUpperLimit":0.699,
48 "npv":0.667,
49 "npvLowerLimit":0.3,
50 "npvUpperLimit":0.903,
51 "lrPlus":0.778,
52 "lrPlusLowerLimit":0.127,
53 "lrPlusUpperLimit":4.774,
54 "lrMinus":1.167,
55 "lrMinusLowerLimit":0.418,
56 "lrMinusUpperLimit":3.254
57}
58```
59
60### Prospective Test
61
62The prospective test accepts the following JSON object:
63
64```
65var testValues = {
66 "treatedDisease":1,
67 "treatedNoDisease":2,
68 "notTreatedDisease":3,
69 "notTreatedNoDisease":4
70}
71```
72Calling
73```
74ebmstats.getProspectiveTest(testValues);
75```
76Returns
77```
78{
79 "chiSquared":0.179,
80 "pValue":0.673,
81 "rr":0.778,
82 "rrLowerLimit":0.127,
83 "rrUpperLimit":4.774,
84 "arr":0.095,
85 "arrLowerLimit":-0.437,
86 "arrUpperLimit":0.516,
87 "nnt":10,
88 "nntLowerLimit":-2.3,
89 "nntUpperLimit":1.9
90}
91```
92
93### Case-Control Study
94
95The case-control study accepts the following JSON object:
96
97```
98var testValues = {
99 "caseExposed":1,
100 "caseNotExposed":2,
101 "controlExposed": 3,
102 "controlNotExposed": 4
103}
104```
105Calling
106```
107ebmstats.getCaseControlStudy(testValues);
108```
109Returns
110```
111{
112 "chiSquared":0.179,
113 "pValue":0.673,
114 "or":0.667,
115 "orLowerLimit":0.039,
116 "orUpperLimit":11.285
117}
118```
119
120### Randomized Control Study
121
122The randomized control study accepts the following JSON object:
123
124```
125var testValues = {
126 "experimentalOutcome":1,
127 "experimentalNoOutcome":2,
128 "controlOutcome":3,
129 "controlNoOutcome":4
130}
131```
132Calling
133```
134ebmstats.getRct(testValues);
135```
136Returns
137```
138{
139 "chiSquared":0.179,
140 "pValue":0.673,
141 "rrr":0.222,
142 "rrrLowerLimit":-3.774,
143 "rrrUpperLimit":0.873,
144 "arr":0.095,
145 "arrLowerLimit":-0.437,
146 "arrUpperLimit":0.516,
147 "nnt":10,
148 "nntLowerLimit":-2.3,
149 "nntUpperLimit":1.9
150}
151```
\No newline at end of file