Title: | Web Application to Run Meta-Analyses |
---|---|
Description: | Shiny web application to run meta-analyses. Essentially a graphical front-end to package 'meta' for R. Can be useful as an educational tool, and for quickly analyzing and sharing meta-analyses. Provides output to quickly fill in GRADE (Grading of Recommendations, Assessment, Development and Evaluations) Summary-of-Findings tables. Importantly, it allows further processing of the results inside R, in case more specific analyses are needed. |
Authors: | Theodore Lytras [aut, cre] |
Maintainer: | Theodore Lytras <[email protected]> |
License: | GPL (>=2) |
Version: | 0.3.2 |
Built: | 2024-11-23 05:20:04 UTC |
Source: | https://github.com/thlytras/minimeta |
This function returns the analytical options stored in a miniMeta object, as a named list of arguments, for further processing.
analysisOptions(x, data = FALSE)
analysisOptions(x, data = FALSE)
x |
An object of class |
data |
If |
A named list of arguments corresponding to the arguments of
metagen
or metabin
.
analysisOptions(example_miniMeta_rct)
analysisOptions(example_miniMeta_rct)
Returns an entire miniMeta analysis in an R source code format. This provides a basis for further processing the results exported from miniMeta, using R code, in order to perform more elaborate or more specific analyses.
as.source(x)
as.source(x)
x |
An object of class |
A character vector of length one, containing R code that
loads the data, runs the meta-analysis, and plots a forest plot.
You can save this in a text file using writeLines
.
fname <- tempfile("my_analysis", fileext = ".R") fname # Writes the miniMeta analysis to an R script writeLines(as.source(example_miniMeta_rct), fname)
fname <- tempfile("my_analysis", fileext = ".R") fname # Writes the miniMeta analysis to an R script writeLines(as.source(example_miniMeta_rct), fname)
These are example miniMeta meta-analyses, with study data taken from
Lytras et al, 2014.
Object example_miniMeta_rct
contains a meta-analysis of Randomized
Controlled Trials (RCTs), and example_miniMeta_obs
a meta-analysis
of observational studies.
example_miniMeta_obs example_miniMeta_rct
example_miniMeta_obs example_miniMeta_rct
Objects of class miniMeta
An object of class miniMeta
(inherits from list
) of length 4.
An object of class miniMeta
(inherits from list
) of length 4.
Lytras T, Nikolopoulos G, Bonovas S. World J Gastroenterol 2014;20(7):1858-70 (PubMed)
Draws a forest plot for a miniMeta object using the options stored in the object
## S3 method for class 'miniMeta' forest(x, ...)
## S3 method for class 'miniMeta' forest(x, ...)
x |
An object of class |
... |
Further arguments passed to or from other methods |
forest(example_miniMeta_obs)
forest(example_miniMeta_obs)
This function checks whether this is a valid miniMeta object
is.miniMeta(x)
is.miniMeta(x)
x |
An object of class |
TRUE
if it is a valid miniMeta object, FALSE
if it is not.
is.miniMeta(example_miniMeta_obs) # returns TRUE is.miniMeta(example_miniMeta_rct) # returns TRUE
is.miniMeta(example_miniMeta_obs) # returns TRUE is.miniMeta(example_miniMeta_rct) # returns TRUE
This function checks whether this is a valid miniMeta object holding a a meta-analysis of observational studies.
is.miniMeta.obs(x)
is.miniMeta.obs(x)
x |
An object of class |
TRUE
if it is a valid miniMeta object holding a meta-analysis
of observational studies, FALSE
if it is not.
is.miniMeta.obs(example_miniMeta_obs) # returns TRUE is.miniMeta.obs(example_miniMeta_rct) # returns FALSE
is.miniMeta.obs(example_miniMeta_obs) # returns TRUE is.miniMeta.obs(example_miniMeta_rct) # returns FALSE
This function checks whether this is a valid miniMeta object holding a a meta-analysis of Randomized Controlled Trials (RCTs).
is.miniMeta.rct(x)
is.miniMeta.rct(x)
x |
An object of class |
TRUE
if it is a valid miniMeta object holding a meta-analysis
of Randomized Controlled Trials (RCTs), FALSE
if it is not.
is.miniMeta.rct(example_miniMeta_obs) # returns FALSE is.miniMeta.rct(example_miniMeta_rct) # returns TRUE
is.miniMeta.rct(example_miniMeta_obs) # returns FALSE is.miniMeta.rct(example_miniMeta_rct) # returns TRUE
This function lanuches miniMeta in your browser
miniMeta()
miniMeta()
## Not run: miniMeta() ## End(Not run)
## Not run: miniMeta() ## End(Not run)
Read a comma-separated list of arguments (as a character string), parse them, and return as a named R list. This function is used in miniMeta to parse arguments for forest.meta() when given as a string.
parseArguments(x)
parseArguments(x)
x |
A character vector (of length one) containing the arguments. All should be named. |
A named list of arguments, or an object of class "try-error" on failure.
parseArguments('col.diamond="red", sm="RR", common=FALSE')
parseArguments('col.diamond="red", sm="RR", common=FALSE')
This function returns the forest plot options stored in a miniMeta
object, as a named list of arguments, for further processing.
This allows finer control than directly plotting using the
forest.miniMeta
method. See the example below.
plotOptions(x)
plotOptions(x)
x |
An object of class |
A named list of arguments corresponding to the arguments of
forest.meta
.
## Not run: # Extract the plot options from the miniMeta object plot_opts <- plotOptions(example_miniMeta_obs) # Call directly the forest.meta method, with all plot options do.call(forest, c(x=list(example_miniMeta_obs$meta), plot_opts)) # Equivalently, call the forest.miniMeta method directly forest(example_miniMeta_obs) ## End(Not run)
## Not run: # Extract the plot options from the miniMeta object plot_opts <- plotOptions(example_miniMeta_obs) # Call directly the forest.meta method, with all plot options do.call(forest, c(x=list(example_miniMeta_obs$meta), plot_opts)) # Equivalently, call the forest.miniMeta method directly forest(example_miniMeta_obs) ## End(Not run)
Calculates sample size for a trial with a binomial outcome, for a given power and false positive rate.
sampleSizeBin(cer, RRR = 25, ier = NULL, a = 0.05, b = 0.2, K = 1)
sampleSizeBin(cer, RRR = 25, ier = NULL, a = 0.05, b = 0.2, K = 1)
cer |
Control group event rate, a value between 0 and 1. All should be named. |
RRR |
Relative Risk Reduction (%) in the intervention group. |
ier |
Intervention group event rate, a value between 0 and 1
If |
a |
False positive rate (alpha). Defaults to 0.05 (5%). |
b |
False negative rate (beta). Defaults to 0.2. Power is one minus beta; thus the default is 80% power. |
K |
Ratio of intervention group size to control group size.
Defaults to 1, meaning both groups have the same size.
Set to infinity ( |
An integer vector of length 2, with the sample sizes for the control and intervention groups.
If K=Inf
, then the sample size calculation is not for a study
with two groups, but for a single-group study in which a fixed known
population event rate is assumed. In that case, argument cer
represents the population event rate, and ier
the study event
rate that it we anticipate. And the return value is a single value,
i.e. the sample size of the study.
# Sample size for a trial with 40\% control event rate and 1:1 randomization, # aiming to show a Relative Risk Reduction of 30\% with 80\% power. sampleSizeBin(0.4, RRR=30) # Sample size for a single-group study aiming to show an event rate of 20\% # against a population event rate of 10\%, with 90\% power. sampleSizeBin(0.1, ier=0.2, b=0.1, K=Inf)
# Sample size for a trial with 40\% control event rate and 1:1 randomization, # aiming to show a Relative Risk Reduction of 30\% with 80\% power. sampleSizeBin(0.4, RRR=30) # Sample size for a single-group study aiming to show an event rate of 20\% # against a population event rate of 10\%, with 90\% power. sampleSizeBin(0.1, ier=0.2, b=0.1, K=Inf)
Calculates sample size for a trial with a continuous outcome, for a given power and false positive rate.
sampleSizeCont(Dm, SD, a = 0.05, b = 0.2, K = 1)
sampleSizeCont(Dm, SD, a = 0.05, b = 0.2, K = 1)
Dm |
Anticipated absolute difference in means between the two groups (intervention and control). |
SD |
Anticipated standard deviation for the outcome. |
a |
False positive rate (alpha). Defaults to 0.05 (5%). |
b |
False negative rate (beta). Defaults to 0.2. Power is one minus beta; thus the default is 80% power. |
K |
Ratio of intervention group size to control group size.
Defaults to 1, meaning both groups have the same size.
Set to infinity ( |
An integer vector of length 2, with the sample sizes for the control and intervention groups.
If K=Inf
, then the sample size calculation is not for a study
with two groups, but for a single-group study in which we try to show
a difference from a fixed known population mean. In that case, argument
Dm
represents the absolute difference between the study mean and
population mean, rather than the difference in means between two groups.
And the return value is a single value, i.e. the sample size of the study.
# Sample size for a trial with 2:1 randomization, aiming to show a mean # difference of 2 for a continuous outcome with a standard deviation of 3, # with 90\% power. sampleSizeCont(2, 3, b=0.1, K=2) # Similar for a single-group study aiming to show a difference of 2 against # a known population mean. sampleSizeCont(2, 3, b=0.1, K=Inf)
# Sample size for a trial with 2:1 randomization, aiming to show a mean # difference of 2 for a continuous outcome with a standard deviation of 3, # with 90\% power. sampleSizeCont(2, 3, b=0.1, K=2) # Similar for a single-group study aiming to show a difference of 2 against # a known population mean. sampleSizeCont(2, 3, b=0.1, K=Inf)