Ejemplo n.º 1
0
    def test_example_3(self):
        example = """
NN EE —
-10 5 0 5 10

Favours [Pedicle Screw] Favours [Hybrid Instrumentation]
"""
        groups, mid_scale = SPSSForestPlot._decode_footer_scale_ocr(example)
        self.assertEqual(groups, ("Pedicle Screw", "Hybrid Instrumentation"))
        self.assertEqual(mid_scale, 0.0)
Ejemplo n.º 2
0
 def test_example_4(self):
     example = 'Heterogeneity: Chi? = 15.08, df= 10 (P = 0.13);\n‘Test for overall effect: Z = 9.01 (P < 0.00001)\n\n\n\n'
     hetrogeneity, overall_effect = SPSSForestPlot._decode_footer_summary_ocr(
         example)
     self.assertEqual(dict(hetrogeneity), {
         "Chi": 15.08,
         "df": 10.0,
         "P": 0.13
     })
     self.assertEqual(overall_effect, {"Z": 9.01, "P": 0.00001})
Ejemplo n.º 3
0
 def test_example_6(self):
     example = 'Heterogeneity: Chi? = 2.11, df = 5 (P = 0.83); 7 = 0%\nTest for overall effect: Z = 3.80 (P = 0.0001)\n\n'
     hetrogeneity, overall_effect = SPSSForestPlot._decode_footer_summary_ocr(
         example)
     self.assertEqual(dict(hetrogeneity), {
         "Chi": 2.11,
         "df": 5.0,
         "P": 0.83,
         "I": 0.0
     })
     self.assertEqual(overall_effect, {"Z": 3.8, "P": 0.0001})
Ejemplo n.º 4
0
 def test_example_2(self):
     example = 'Heterogeneity: Chi? = 2.07, df= 10 (P= 1.00); /7= 0%\nTest for overall effect: Z= 1.13 (P = 0.26)\n\x0c'
     hetrogeneity, overall_effect = SPSSForestPlot._decode_footer_summary_ocr(
         example)
     self.assertEqual(dict(hetrogeneity), {
         "Chi": 2.07,
         "df": 10.0,
         "P": 1.00,
         "I": 0.0
     })
     self.assertEqual(overall_effect, {"Z": 1.13, "P": 0.26})
Ejemplo n.º 5
0
 def test_example_1(self):
     example = 'Heterogeneity: Tau? = 0.00; Chi? = 2.98, df= 4 (P = 0.56), I= 0% |\nTest for overall effect: Z= 3.12'
     hetrogeneity, overall_effect = SPSSForestPlot._decode_footer_summary_ocr(
         example)
     self.assertEqual(dict(hetrogeneity), {
         "Tau": 0.00,
         "Chi": 2.98,
         "df": 4,
         "P": 0.56,
         "I": 0.0
     })
     self.assertEqual(overall_effect, {"Z": 3.12})
Ejemplo n.º 6
0
    def test_lines_example_1(self):
        example = [
            "Chua D (2010) 15 47 9 48 8.9% 1.70 (0.83, 3.50)",
            "Dou-Dou Li (2015) 9 18 § 18 7.4% 1.80 (0.75, 4.32)",
            "Fei Teng (2017) 22 26 6 26 9.0% 3.53 (1.72, 7.22]",
        ]

        titles, values = SPSSForestPlot._decode_table_lines_ocr(example)
        self.assertEqual(
            titles, ["Chua D (2010)", "Dou-Dou Li (2015)", "Fei Teng (2017)"])
        self.assertEqual(values, [
            (1.7, 0.83, 3.5),
            (1.8, 0.75, 4.32),
            (3.53, 1.72, 7.22),
        ])
Ejemplo n.º 7
0
 def test_example_1(self):
     example = 'Odds Ratio\nM-H. Fixed. 95% Cl\n\x0c'
     values = SPSSForestPlot._decode_header_summary_ocr(example)
     self.assertEqual(values, ("M-H", "Fixed", "95"))
Ejemplo n.º 8
0
 def test_example_4(self):
     example = "Mean Difference\nTV. Random. 95% CI\n"
     values = SPSSForestPlot._decode_header_summary_ocr(example)
     self.assertEqual(values, ("IV", "Random", "95"))
Ejemplo n.º 9
0
 def test_example_3(self):
     example = 'Mean Difference\n1V. Fixed, 95% Cl\n'
     values = SPSSForestPlot._decode_header_summary_ocr(example)
     self.assertEqual(values, ("IV", "Fixed", "95"))
Ejemplo n.º 10
0
 def test_example_2(self):
     example = 'Mean Difference\nIV. Random. 95% Cl\n\x0c'
     values = SPSSForestPlot._decode_header_summary_ocr(example)
     self.assertEqual(values, ("IV", "Random", "95"))