From e59cbda08943f7f360db2772c6b0ba43fb314ae4 Mon Sep 17 00:00:00 2001
From: Michael Rosenberg CM|9Y^%{`|0%X{z4!v~bxW@j4cENAbK
zo33K+sXby5QaYE(Rq9u(X63SGl~hcPNHQ|zGc6References
analysis of data from retrospective studies of disease. Journal of the National Cancer
Institute 22:719–748.
Qt6UUvda4A}ubVRIk^c{q{^ee4QTufwnP8Jtuw&Zef_J
zS(Z=QWtz&~X5~n&JLBlrOR-czTBtsZ!54cbFiWo2avN)GW773b<#^OSU3{;(|K#j%
z)Yv!2ZVzpnf8A8*VV-;L$t&q5qN=*mwIPW?XeG7iuImo`Si7UWAmL+g%4;s3Zv5C0
zTv+sslM}K&!a&e99ussvYKuR9#vWXgWnl*QBVpP~iD!*IFUZd7C5g=HaY_an8qz{!
zZ~XX82v+R&`LLbue&a}|DCWu4@!x7>8J$w(5|gd)Xhum{a*h1I(^E2+|L=9;e-SDO
aLMZUuht`#0Q$Bt{0uH;JcmBSedHz4PPT?m2
literal 0
HcmV?d00001
diff --git a/src/MetaWinAnalysis.py b/src/MetaWinAnalysis.py
index 2c19072..cbb4295 100644
--- a/src/MetaWinAnalysis.py
+++ b/src/MetaWinAnalysis.py
@@ -56,6 +56,7 @@ def __init__(self):
self.create_graph = False
self.k_estimator = "L"
self.cor_test = "tau"
+ self.norm_ci = True
def report_choices(self):
output_blocks = []
@@ -168,14 +169,25 @@ def report_choices(self):
output.append("→ {}".format(get_text("Fixed Effects Model")))
output_blocks.append(output)
+ output = []
+ if self.norm_ci:
+ output.append("→ {}".format(get_text("ci from norm")))
+ else:
+ output.append("→ {}".format(get_text("ci from t")))
if self.bootstrap_mean is not None:
- output_blocks.append(["→ {}: {} {}".format(get_text("Use bootstrap for confidence intervals around "
- "means"), self.bootstrap_mean,
- get_text("iterations")),
- "→ {}: ".format(get_text("Citations")) + get_citation("Adams_et_1997") + ", " +
- get_citation("Dixon_1993")])
+ output.extend(["→ {}: {} {}".format(get_text("Use bootstrap for confidence intervals around means"),
+ self.bootstrap_mean, get_text("iterations")),
+ "→ {}: ".format(get_text("Citations")) + get_citation("Adams_et_1997") + ", " +
+ get_citation("Dixon_1993")])
+ # output_blocks.append(["→ {}: {} {}".format(get_text("Use bootstrap for confidence intervals around "
+ # "means"), self.bootstrap_mean,
+ # get_text("iterations")),
+ # "→ {}: ".format(get_text("Citations")) + get_citation("Adams_et_1997") + ", " +
+ # get_citation("Dixon_1993")])
citations.append("Adams_et_1997")
citations.append("Dixon_1993")
+ output_blocks.append(output)
+
if self.structure == RANKCOR:
output_blocks.append(["→ {}: {} {}".format(get_text("Randomization to test correlation"),
self.randomize_model, get_text("iterations"))])
@@ -1773,7 +1785,8 @@ def add_resampling_options_to_dialog(sender, test_model: bool = False):
return randomization_group
-def do_meta_analysis(data, options, decimal_places: int = 4, alpha: float = 0.05, tree: Optional = None):
+def do_meta_analysis(data, options, decimal_places: int = 4, alpha: float = 0.05, tree: Optional = None,
+ norm_ci: bool = True):
"""
primary function controlling the execution of an analysis
@@ -1781,48 +1794,51 @@ def do_meta_analysis(data, options, decimal_places: int = 4, alpha: float = 0.05
results
"""
output_blocks = [["{}
".format(get_text("Analysis"))]]
+ options.norm_ci = norm_ci
output, all_citations = options.report_choices()
output_blocks.extend(output)
if options.structure == SIMPLE_MA:
(output, figure, fig_caption, chart_data, analysis_values,
- citations) = MetaWinAnalysisFunctions.simple_meta_analysis(data, options, decimal_places, alpha)
+ citations) = MetaWinAnalysisFunctions.simple_meta_analysis(data, options, decimal_places, alpha, norm_ci)
elif options.structure == GROUPED_MA:
(output, figure, fig_caption, chart_data, analysis_values,
- citations) = MetaWinAnalysisFunctions.grouped_meta_analysis(data, options, decimal_places, alpha)
+ citations) = MetaWinAnalysisFunctions.grouped_meta_analysis(data, options, decimal_places, alpha, norm_ci)
elif options.structure == CUMULATIVE_MA:
output, figure, fig_caption, chart_data = MetaWinAnalysisFunctions.cumulative_meta_analysis(data, options,
decimal_places,
- alpha)
+ alpha, norm_ci)
analysis_values = None
citations = []
elif options.structure == REGRESSION_MA:
(output, figure, fig_caption, chart_data, analysis_values,
- citations) = MetaWinAnalysisFunctions.regression_meta_analysis(data, options, decimal_places, alpha)
+ citations) = MetaWinAnalysisFunctions.regression_meta_analysis(data, options, decimal_places, alpha, norm_ci)
elif options.structure == COMPLEX_MA:
output, analysis_values, citations = MetaWinAnalysisFunctions.complex_meta_analysis(data, options,
- decimal_places, alpha)
+ decimal_places, alpha,
+ norm_ci)
figure = None
fig_caption = None
chart_data = None
elif options.structure == NESTED_MA:
(output, figure, fig_caption, chart_data, analysis_values,
- citations) = MetaWinAnalysisFunctions.nested_meta_analysis(data, options, decimal_places, alpha)
+ citations) = MetaWinAnalysisFunctions.nested_meta_analysis(data, options, decimal_places, alpha, norm_ci)
elif options.structure == TRIM_FILL:
(output, figure, fig_caption, chart_data, analysis_values,
- citations) = MetaWinAnalysisFunctions.trim_and_fill_analysis(data, options, decimal_places, alpha)
+ citations) = MetaWinAnalysisFunctions.trim_and_fill_analysis(data, options, decimal_places, alpha, norm_ci)
elif options.structure == JACKKNIFE:
(output, figure, fig_caption,
- chart_data, citations) = MetaWinAnalysisFunctions.jackknife_meta_analysis(data, options, decimal_places, alpha)
+ chart_data, citations) = MetaWinAnalysisFunctions.jackknife_meta_analysis(data, options, decimal_places,
+ alpha, norm_ci)
analysis_values = None
elif options.structure == PHYLOGENETIC_MA:
output, citations = MetaWinAnalysisFunctions.phylogenetic_meta_analysis(data, options, tree, decimal_places,
- alpha)
+ alpha, norm_ci)
analysis_values = None
figure = None
fig_caption = None
chart_data = None
elif options.structure == RANKCOR:
- output, citations = MetaWinAnalysisFunctions.rank_correlation_analysis(data, options, decimal_places, alpha)
+ output, citations = MetaWinAnalysisFunctions.rank_correlation_analysis(data, options, decimal_places)
figure = None
fig_caption = None
chart_data = None
@@ -1841,7 +1857,7 @@ def do_meta_analysis(data, options, decimal_places: int = 4, alpha: float = 0.05
def meta_analysis(sender, data, last_effect, last_var, decimal_places: int = 4, alpha: float = 0.05,
- tree: Optional = None):
+ tree: Optional = None, norm_ci: bool = True):
"""
primary function for calling various dialogs to retrieve user choices about how to run various analyses
"""
@@ -1894,7 +1910,7 @@ def meta_analysis(sender, data, last_effect, last_var, decimal_places: int = 4,
if meta_analysis_options.structure is not None:
output, figure, fig_caption, chart_data, _ = do_meta_analysis(data, meta_analysis_options, decimal_places,
- alpha, tree)
+ alpha, tree, norm_ci)
sender.last_effect = meta_analysis_options.effect_data
sender.last_var = meta_analysis_options.effect_vars
return output, figure, fig_caption, chart_data
diff --git a/src/MetaWinAnalysisFunctions.py b/src/MetaWinAnalysisFunctions.py
index 2c070e5..741c4d7 100644
--- a/src/MetaWinAnalysisFunctions.py
+++ b/src/MetaWinAnalysisFunctions.py
@@ -2349,7 +2349,7 @@ def kendalls_tau(e_ranks, x_ranks):
return tau
-def rank_correlation_analysis(data, options, decimal_places: int = 4, alpha: float = 0.05):
+def rank_correlation_analysis(data, options, decimal_places: int = 4):
# filter and prepare data for analysis
effect_sizes = options.effect_data
variances = options.effect_vars
diff --git a/src/MetaWinConfig.py b/src/MetaWinConfig.py
index bae4be9..f2b3e62 100644
--- a/src/MetaWinConfig.py
+++ b/src/MetaWinConfig.py
@@ -46,7 +46,8 @@ def default_config() -> dict:
"filtered row color": "lightpink",
"filtered col color": "red",
"auto update check": True,
- "alpha": 0.05
+ "alpha": 0.05,
+ "confidence interval distribution": "Normal"
}
@@ -86,6 +87,10 @@ def validate_config(key, value):
return value
except ValueError:
return None
+ elif key == "confidence interval distribution":
+ if value == "Students t":
+ return value
+ return "Normal"
return value
@@ -103,5 +108,6 @@ def export_config(main_window) -> None:
outfile.write("filtered col color={}\n".format(main_window.filtered_col_color))
outfile.write("auto update check={}\n".format(main_window.auto_update_check))
outfile.write("alpha={}\n".format(main_window.alpha))
+ outfile.write("confidence interval distribution={}".format(main_window.confidence_interval_dist))
except IOError:
pass
diff --git a/src/MetaWinConstants.py b/src/MetaWinConstants.py
index 6d47e2c..bf4efea 100644
--- a/src/MetaWinConstants.py
+++ b/src/MetaWinConstants.py
@@ -68,6 +68,8 @@ def resource_path(relative_path: str, inc_file: bool = False) -> str:
radial_plot_icon = resource_path(icon_path + "draw-radial-plot@256px.png")
forest_plot_icon = resource_path(icon_path + "chart-forest-plot@256px.png")
normal_quantile_icon = resource_path(icon_path + "letter-z-2@256px.png")
+norm_dist_icon = resource_path(icon_path + "letter-z-2@256px.png")
+t_dist_icon = resource_path(icon_path + "letter-t@256px.png")
gear_icon = resource_path(icon_path + "gear-filled@256px.png")
clear_filter_icon = resource_path(icon_path + "filter-filled-eraser@256px.png")
font_icon = resource_path(icon_path + "text-fonts@256px.png")
diff --git a/src/MetaWinLanguage.py b/src/MetaWinLanguage.py
index 611f401..2f5f335 100644
--- a/src/MetaWinLanguage.py
+++ b/src/MetaWinLanguage.py
@@ -14,6 +14,7 @@
"About MetaWin": "About MetaWin",
"Additional Options": "Additional Options",
"Analysis": "Analysis",
+ "Analysis Options": "Analysis Options",
"available": "available",
"Automatically check for udpates": "Automatically check for udpates",
"Axes Titles": "Axes Titles",
@@ -32,6 +33,8 @@
"Categorical Independent Variables(s)": "Categorical Independent Variable(s)",
"Check for updates": "Check for updates",
"Choose an Analysis": "Choose an Analysis",
+ "ci from norm": "Standard confidence intervals around means based on Normal distribution",
+ "ci from t": "Standard confidence intervals around means based on Student\'s t distribution",
"Citation": "Citation",
"Citations": "Citations",
"Clear Data": "Clear Data",
@@ -217,6 +220,8 @@
"No Response": "No Response",
"No Weighting": "No Weighting",
"None": "None",
+ "normal to t": "Change Confidence Interval Distribution from Normal to Student\'s t",
+ "t to normal": "Change Confidence Interval Distribution from Student\'s t to Normal",
"Normal Quantile": "Normal Quantile",
"Normal Quantile Plot": "Normal Quantile Plot",
"normal_quantile_caption": "Normal Quantile plot following {}. The "
diff --git a/src/MetaWinMain.py b/src/MetaWinMain.py
index bd4055c..2270a55 100644
--- a/src/MetaWinMain.py
+++ b/src/MetaWinMain.py
@@ -48,6 +48,7 @@ def __init__(self, config: dict):
self.filtered_col_color = config["filtered col color"]
self.auto_update_check = config["auto update check"]
self.alpha = config["alpha"]
+ self.confidence_interval_dist = config["confidence interval distribution"]
self.help = MetaWinConstants.help_index["metawin"]
self.localization_help = MetaWinConstants.help_index["localization"]
self.main_area = None
@@ -68,6 +69,7 @@ def __init__(self, config: dict):
self.tree_area_action = None
self.tree_toolbar = None
self.auto_update_check_action = None
+ self.conf_int_action = None
# self.language_actions = None
self.language_box = None
self.output_saved = True
@@ -167,15 +169,23 @@ def init_ui(self):
self.data_toolbar_action.triggered.connect(self.show_data_toolbar_click)
data_options_menu.addAction(self.data_toolbar_action)
options_menu.addMenu(data_options_menu)
+ # analysis options submenu
+ analysis_options_menu = QMenu(get_text("Analysis Options"), self)
+ # analysis_options_menu.setIcon(QIcon(MetaWinConstants.output_icon))
+ output_alpha_action = QAction(QIcon(MetaWinConstants.alpha_icon), get_text("Significance Level"), self)
+ output_alpha_action.triggered.connect(self.set_alpha_significance)
+ analysis_options_menu.addAction(output_alpha_action)
+ self.conf_int_action = QAction("tmp", self)
+ self.update_conf_int_action()
+ self.conf_int_action.triggered.connect(self.change_conf_int_distribution)
+ analysis_options_menu.addAction(self.conf_int_action)
+ options_menu.addMenu(analysis_options_menu)
# output options submenu
output_options_menu = QMenu(get_text("Output Options"), self)
output_options_menu.setIcon(QIcon(MetaWinConstants.output_icon))
output_decimal_action = QAction(QIcon(MetaWinConstants.decimal_icon), get_text("Decimal Places"), self)
output_decimal_action.triggered.connect(self.set_output_decimal_places)
output_options_menu.addAction(output_decimal_action)
- output_alpha_action = QAction(QIcon(MetaWinConstants.alpha_icon), get_text("Significance Level"), self)
- output_alpha_action.triggered.connect(self.set_alpha_significance)
- output_options_menu.addAction(output_alpha_action)
output_font_action = QAction(QIcon(MetaWinConstants.font_icon), get_text("Font"), self)
output_font_action.triggered.connect(self.set_output_font)
output_options_menu.addAction(output_font_action)
@@ -682,9 +692,13 @@ def save_data(self) -> bool:
def meta_analysis(self) -> None:
if self.data is not None:
+ if self.confidence_interval_dist == "Students t":
+ norm_ci = False
+ else:
+ norm_ci = True
output, figure, fig_caption, chart_data = MetaWinAnalysis.meta_analysis(self, self.data, self.last_effect,
self.last_var, self.output_decimals,
- self.alpha, self.phylogeny)
+ self.alpha, self.phylogeny, norm_ci)
if output is not None:
self.write_multi_output_blocks(output)
self.main_area.setCurrentIndex(1)
@@ -839,3 +853,18 @@ def edit_graph(self):
if figure is not None:
caption = self.chart_caption
self.show_figure(figure, caption, self.chart_data)
+
+ def change_conf_int_distribution(self):
+ if self.confidence_interval_dist == "Normal":
+ self.confidence_interval_dist = "Students t"
+ else:
+ self.confidence_interval_dist = "Normal"
+ self.update_conf_int_action()
+
+ def update_conf_int_action(self):
+ if self.confidence_interval_dist == "Normal":
+ self.conf_int_action.setText(get_text("normal to t"))
+ self.conf_int_action.setIcon(QIcon(MetaWinConstants.norm_dist_icon))
+ else:
+ self.conf_int_action.setText(get_text("t to normal"))
+ self.conf_int_action.setIcon(QIcon(MetaWinConstants.t_dist_icon))
From 92b4cbc9b76934387efd4de83241338cf008603f Mon Sep 17 00:00:00 2001
From: Michael Rosenberg Help Table of Contents
Decimal Places
places used to display these values is automatically determined by the software based on the number of desired
replicates.
By default, significance levels for generating confidence intervals and certain types of tests are - based on a standard value of 5% (α = 0.05). This value can be changed by - choosing
- from the - menu or - from the toolbar on the - left side of the Output Tab. Valid options are numbers between 0.01 and 1.0). - Note that changing this value will - only affect future output; vales already computed will not be changed. If you change the significance - level to use in the output, will attempt to remember this - choice the next time you run the program.This choice also effects a few of the direct figures you can draw, such as - Forest Plots - and Normal Quantile Plots.
-You can change the font and it's properties used in the Output Tab by choosing
from the @@ -470,6 +456,40 @@By default, significance levels for generating confidence intervals and certain types of tests are + based on a standard value of 5% (α = 0.05). This value can be changed by + choosing
+ from the + menu or + from the toolbar on the + left side of the Output Tab. Valid options are numbers between 0.01 and 1.0). + Note that changing this value will + only affect future output; vales already computed will not be changed. If you change the significance + level to use in the output, will attempt to remember this + choice the next time you run the program.This choice also effects a few of the direct figures you can draw, such as + Forest Plots + and Normal Quantile Plots.
+ +When determining confidence intervals around means using standard distributions (rather than a + boostrap procedure), the traditional approach in meta-analysis has generally been to use a Normal + distribution. In earlier versions of
+ , we used Student's t + distribution instead, because we thought it useful to account for the uncertainty in estimation due + to the small number of studies often found in meta-analyses. With this new version, the user can + specify which distribution they wish to use, with the Normal distribution set as default. +To change the distribution, choose the item under the +
+ menu, which will toggle between the two + distributions. The current distribution is indicated by the icon to the left of the menu option + (either a Z or a t), as well as by the text + of the menu item which specifies the distributions being changed both "from" and "to". + will attempt to remember this choice the next time you run the + program.The specified distribution is also listed as one of the user-specified parameters at the beginning of + analysis output.
+
+→ Standard confidence intervals around means based on Normal distribution
→ Use bootstrap for confidence intervals around means: 999 iterations
→ Citations: Adams et al. (1997), Dixon (1993)
+→ Standard confidence intervals around means based on Normal distribution +
+85 studies will be included in this analysis
@@ -1194,6 +1218,7 @@
+→ Standard confidence intervals around means based on Normal distribution
→ Use bootstrap for confidence intervals around means: 999 iterations
→ Citations: Adams et al. (1997), Dixon (1993)
+→ Standard confidence intervals around means based on Normal distribution
→ Use bootstrap for confidence intervals around means: 999 iterations
→ Citations: Adams et al. (1997), Dixon (1993)
+→ Standard confidence intervals around means based on Normal distribution
→ Use bootstrap for confidence intervals around means: 999 iterations
→ Citations: Adams et al. (1997), Dixon (1993)
+→ Standard confidence intervals around means based on Normal distribution
→ Use randomization to test model structure: 999 iterations
→ Citation: Adams et al. (1997)
+→ Standard confidence intervals around means based on Normal distribution
→ Use bootstrap for confidence intervals around means: 999 iterations
→ Citations: Adams et al. (1997), Dixon (1993)
+→ Standard confidence intervals around means based on Normal distribution
→ Use bootstrap for confidence intervals around means: 999 iterations
→ Citations: Adams et al. (1997), Dixon (1993)