### Install meta Package from GitHub (without vignettes) Source: https://github.com/guido-s/meta/blob/develop/README.md Install the development version of the 'meta' package from GitHub without building the vignettes for a faster installation. ```r remotes::install_github("guido-s/meta") ``` -------------------------------- ### Install meta Package from GitHub Source: https://github.com/guido-s/meta/blob/develop/README.md Install the development version of the 'meta' package directly from GitHub using the 'remotes' package. Set 'build_vignettes = TRUE' to include package vignettes. ```r install.packages("remotes") remotes::install_github("guido-s/meta", build_vignettes = TRUE) ``` -------------------------------- ### Install meta Package from CRAN Source: https://github.com/guido-s/meta/blob/develop/README.md Use this command to install the latest stable release of the 'meta' package from the Comprehensive R Archive Network (CRAN). ```r install.packages("meta") ``` -------------------------------- ### Standard Meta-Analysis Result Object Creation Source: https://github.com/guido-s/meta/blob/develop/_autodocs/README.md Demonstrates how to create a standard meta-analysis result object using the `metagen` function and provides examples of accessing key results. ```r m <- metagen(TE, seTE, studlab = study, data = data) ``` -------------------------------- ### Simple Meta-analysis with metagen Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-metaanalysis-functions.md Example of using the `metagen` function with pre-calculated log hazard ratios and their standard errors. Shows how to perform the analysis and access key results like the random effects estimate, between-study variance, and heterogeneity index. ```r # Simple example with pre-calculated log hazard ratios data <- data.frame( study = c("Study A", "Study B", "Study C"), TE = c(0.15, 0.22, 0.18), seTE = c(0.10, 0.12, 0.08) ) m <- metagen(TE = TE, seTE = seTE, studlab = study, data = data, sm = "logHR", method.tau = "DL") print(m) # Access results m$TE.random # Random effects estimate m$tau2 # Between-study variance m$I2 # Heterogeneity index ``` -------------------------------- ### Retrieve Specific Meta-Analysis Setting Source: https://github.com/guido-s/meta/blob/develop/_autodocs/quick-reference.md Use `gs()` (get setting) with the setting name as a string argument to retrieve a specific configuration value, such as the method for estimating tau. ```r # Get specific setting method <- gs("method.tau") ``` -------------------------------- ### Get Global Setting Value Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Use this low-level function to retrieve a specific global setting value by its keyword. Provide a default value if the setting might not exist. ```r default.tau.method <- gs("method.tau") ``` -------------------------------- ### Get Current Meta-Analysis Settings Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Retrieve all current global settings or a specific setting using gs(). ```r # Get all settings settings <- settings.meta() # Get specific setting common_default <- gs("common") ``` -------------------------------- ### Plot Customization in R Source: https://github.com/guido-s/meta/blob/develop/_autodocs/quick-reference.md Examples of customizing forest plots by controlling displayed elements and appearance, and saving plots to files. Ensure 'm' is a valid meta-analysis object. ```r # Control what's displayed forest(m, common = TRUE, # Show common effect random = TRUE, # Show random effects prediction = TRUE, # Show prediction interval subgroup = TRUE, # Show subgroups study.results = TRUE # Show individual studies ) ``` ```r # Customize appearance forest(m, col.common = "blue", col.random = "red", text.common = "Fixed Effect", text.random = "Random Effects" ) ``` ```r # Save to file forest(m, filename = "plot.png", path = "/output") forest(m, filename = "plot.pdf", width = 10, height = 12) ``` -------------------------------- ### Rerun Analysis with Different Tau Estimation Method Source: https://github.com/guido-s/meta/blob/develop/_autodocs/quick-reference.md Use the `update` function to rerun a meta-analysis with modified parameters. This example changes the method used for estimating the between-study variance (tau). ```r # Change analysis method m2 <- update(m, method.tau = "ML") ``` -------------------------------- ### Configure Default Meta-Analysis Settings Source: https://github.com/guido-s/meta/blob/develop/_autodocs/quick-reference.md Use `settings.meta()` with named arguments to set multiple default analysis parameters at once. These defaults will be used in subsequent `metagen` or other meta-analysis function calls unless overridden. ```r # Set multiple defaults at once settings.meta( common = TRUE, random = TRUE, method.tau = "REML", method.random.ci = "HK", level = 0.95, prediction = TRUE ) ``` -------------------------------- ### Basic Meta-Analysis Workflow Source: https://github.com/guido-s/meta/blob/develop/_autodocs/quick-reference.md Perform a basic meta-analysis by preparing data, running the analysis, displaying results, and visualizing the forest plot. Assumes continuous data with 'MD' as the summary measure. ```r # 1. Prepare data data <- read.csv("meta_data.csv") # 2. Run analysis m <- metagen(TE = TE, seTE = seTE, studlab = study, data = data, sm = "MD") # 3. Display results print(m) summary(m) # 4. Visualize forest(m) funnel(m) ``` -------------------------------- ### Get meta Package Citation Source: https://github.com/guido-s/meta/blob/develop/README.md Retrieve the citation information for the 'meta' R package in a format suitable for inclusion in publications. ```r citation(package = "meta") ``` -------------------------------- ### Set Common Effect Label Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Customize the label used for the common effect estimate in the output. For example, change from 'Common effect' to 'Fixed effect'. ```r settings.meta(text.common = "Fixed effect") ``` -------------------------------- ### Retrieve All Meta-Analysis Settings Source: https://github.com/guido-s/meta/blob/develop/_autodocs/quick-reference.md Call `settings.meta()` without arguments to retrieve all currently configured default settings for meta-analysis functions. ```r # Get all current settings all_settings <- settings.meta() ``` -------------------------------- ### gs() - Get global settings Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Low-level function to retrieve a specific global setting value. It takes a keyword and an optional default value if the setting is not found. ```APIDOC ## gs() - Get global settings ### Description Low-level function to retrieve a specific global setting value. ### Signature ```r gs(keyword, NULL.value = NULL) ``` ### Parameters #### Path Parameters - **keyword** (character) - Required - Setting name to retrieve - **NULL.value** (any) - Optional - Value if setting not found (Default: NULL) ### Return Value **Type:** The value of the requested setting ### Example ```r default.tau.method <- gs("method.tau") ``` ``` -------------------------------- ### Set Random Effects Label Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Customize the label used for the random effects estimate in the output. For example, change from 'Random effects' to 'DL random effects'. ```r settings.meta(text.random = "DL random effects") ``` -------------------------------- ### asin2p() - Back-transform from arcsine to proportion Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Inverse arcsine transformation to convert back to proportion scale. ```APIDOC ## asin2p() ### Description Inverse arcsine transformation to convert back to proportion scale. ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **x** (numeric vector) - Required - Arcsine-transformed values ### Response #### Success Response (200) - **Type:** numeric vector of proportions ### Formula p = sin²(x) ``` -------------------------------- ### Save Custom Defaults in .Rprofile Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Persist custom meta-analysis settings by defining them in the .Rprofile or a startup script using .First(). ```r # In .Rprofile or startup script .First <- function() { library(meta) settings.meta( method.tau = "DL", method.random.ci = "HK", common = FALSE, random = TRUE ) } ``` -------------------------------- ### Configure Publication-Ready Output Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Adjust settings for publication-ready meta-analysis output, including number of digits, text labels, and forest plot layout. ```r settings.meta( digits = 2, digits.se = 2, digits.I2 = 1, text.common = "Fixed Effect", text.random = "Random Effects", forest.layout = "JAMA" # Publication style ) ``` -------------------------------- ### settings.meta() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Query existing or set new global default settings for meta-analysis functions. Settings are stored in package environment and inherited by all subsequent analyses unless overridden. ```APIDOC ## settings.meta() ### Description Query existing or set new global default settings for meta-analysis functions. Settings are stored in package environment and inherited by all subsequent analyses unless overridden. ### Signature ```r settings.meta(common = NULL, random = NULL, method.tau = NULL, method.tau.ci = NULL, method.I2 = NULL, method.common.ci = NULL, method.random.ci = NULL, prediction = NULL, method.predict = NULL, level = NULL, level.ma = NULL, adhoc.hakn.ci = NULL, adhoc.hakn.pi = NULL, sm = NULL, ...) ``` ### Parameters #### Parameters - **common** (logical) - No - NULL - Default common effect setting - **random** (logical) - No - NULL - Default random effects setting - **method.tau** (character) - No - NULL - Default tau² estimation - **method.tau.ci** (character) - No - NULL - Default tau² CI method - **method.I2** (character) - No - NULL - Default I² method - **method.common.ci** (character) - No - NULL - Default common effect CI - **method.random.ci** (character) - No - NULL - Default random effects CI - **prediction** (logical) - No - NULL - Default prediction interval - **method.predict** (character) - No - NULL - Default prediction method - **level** (numeric) - No - NULL - Default individual CI level - **level.ma** (numeric) - No - NULL - Default pooled estimate CI level - **adhoc.hakn.ci** (character) - No - NULL - Hartung-Knapp ad-hoc adjustment - **adhoc.hakn.pi** (character) - No - NULL - Hartung-Knapp for PI adjustment - **sm** (character) - No - NULL - Default summary measure ### Return Value **Type:** Invisibly returns list of all current settings ### Example ```r # Query current settings current <- settings.meta() print(current) # Set new defaults settings.meta( common = FALSE, random = TRUE, method.tau = "REML", method.random.ci = "HK", level = 0.95 ) # All subsequent meta-analysis calls use these settings m <- metagen(TE, seTE, studlab = study, data = data) ``` ``` -------------------------------- ### Configure Cochrane Recommended Settings Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Set meta-analysis defaults according to Cochrane recommendations, including DL method for tau, Hartung-Knapp for random effects CI, and Egger's test for bias. ```r settings.meta( method.tau = "DL", # DerSimonian-Laird method.random.ci = "HK", # Hartung-Knapp method.bias = "Egger", # Egger regression test common = TRUE, random = TRUE, prediction = TRUE ) ``` -------------------------------- ### Sensitivity and Influence Analysis Source: https://github.com/guido-s/meta/blob/develop/_autodocs/quick-reference.md Examine study influence using meta-inf, visualize influence using a forest plot, and perform a leave-one-out comparison. Includes an example of subsetting to exclude outliers. ```r # Examine study influence mi <- metainf(m, pooled = "random") forest(mi) # Leave-one-out comparison print(mi) # Exclude outliers and rerun m_clean <- subset(m, abs(TE - m$TE.random) < 2*m$seTE.random) print(m_clean) ``` -------------------------------- ### Set Heterogeneity Index (I²) Calculation Method Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Choose the method for calculating the heterogeneity index (I²). The 'Q' method, based on the Q statistic, is the default. ```r settings.meta(method.I2 = "Q") ``` -------------------------------- ### read.cdir() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Imports meta-analysis data from Cochrane Collaboration data files. Supports various Cochrane-specific data formats and specifications. ```APIDOC ## read.cdir() ### Description Imports meta-analysis data from Cochrane Collaboration data files. Supports various Cochrane-specific data formats and specifications. ### Signature ```r read.cdir(file, studlab.import = "author", ...) ``` ### Parameters #### Path Parameters - **file** (character) - Yes - Description: Path to .cdir file - **studlab.import** (character) - No - Default: "author" - Description: Field to use as study labels #### Other Parameters - **...** (—) - — - Description: Additional arguments ### Return Value **Type:** cdir object containing imported data ``` -------------------------------- ### Manipulating Meta-Analysis Results Source: https://github.com/guido-s/meta/blob/develop/_autodocs/README.md Provides examples of how to manipulate the meta-analysis result object, including subsetting studies, filtering by year, extracting weights and labels, converting to a data frame, and rerunning the analysis with updated settings. ```r # Manipulate: m[1:5] # Subset first 5 studies subset(m, year >= 2010) weights(m) # Study weights labels(m) # Study labels as.data.frame(m) # Convert to data frame update(m, method.tau = "DL") # Rerun with different settings ``` -------------------------------- ### Publication Bias Assessment Source: https://github.com/guido-s/meta/blob/develop/_autodocs/quick-reference.md Assess publication bias using asymmetry tests like Begg's and Egger's. Visualizes potential bias with a funnel plot and includes an example of adjusting for bias using trimfill. ```r # Asymmetry tests b1 <- metabias(m, method = "Begg") b2 <- metabias(m, method = "Egger") # Visualize funnel(m, contour = c(0.95, 0.99)) # Adjust for bias (if detected) tf <- trimfill(m) print(tf) ``` -------------------------------- ### Printing and Summarizing Meta-Analysis Results Source: https://github.com/guido-s/meta/blob/develop/_autodocs/README.md Illustrates how to print the meta-analysis object for a concise overview, obtain a detailed summary, and generate a forest plot for visualization. ```r # Print and summarize: print(m) summary(m) forest(m) # Visualization ``` -------------------------------- ### Heterogeneity Estimation Parameters Source: https://github.com/guido-s/meta/blob/develop/_autodocs/README.md Configure how heterogeneity variance (tau²) and the I² index are estimated. Options include different estimation methods for tau² and specifying a fixed tau² value. ```r method.tau = "REML" # Tau² estimation (DL, REML, ML, EB, PM, etc.) tau.preset = NULL # Fixed tau² (if not estimated) tau.common = TRUE # Same tau across subgroups method.I2 = "Q" # I² from Q statistic or tau² ``` -------------------------------- ### p2logit() - Logit transformation for proportions Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Applies logit transformation to proportions. Maps p ∈ [0, 1] to logit(p) ∈ (-∞, ∞). ```APIDOC ## p2logit() ### Description Applies logit transformation to proportions. Maps p ∈ [0, 1] to logit(p) ∈ (-∞, ∞). ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **x** (numeric vector) - Required - Proportions (0 ≤ p ≤ 1) ### Response #### Success Response (200) - **Type:** numeric vector of logit-transformed values ### Formula logit(p) = ln(p / (1 - p)) ``` -------------------------------- ### print.metareg() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Displays meta-regression coefficients, tests, and model statistics. ```APIDOC ## print.metareg() ### Description Displays meta-regression coefficients, tests, and model statistics. ``` -------------------------------- ### pairwise() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Converts arm-level data into pairwise contrasts, suitable for input into meta-analysis functions. ```APIDOC ## pairwise() ### Description Transforms network meta-analysis arm-level data into pairwise study contrasts. Critical for facilitating arm-level input to meta-analysis functions. ### Signature ```r pairwise(treatment, event = NULL, n, studlab, data = NULL, sm = "", method = NA, ...) ``` ### Parameters #### Path Parameters - **treatment** (character/factor) - Required - Treatment arm labels - **event** (numeric vector) - Optional - Events (for binary data) - **n** (numeric vector) - Required - Sample size per arm - **studlab** (character vector) - Required - Study identifier - **data** (data.frame) - Optional - Data frame containing variables - **sm** (character) - Optional - Summary measure - **method** (character) - Optional - Pooling method ### Return Value **Type:** `pairwise` object (S3 class) convertible to standard data format ### Example ```r # Convert network trial data to pairwise format data_nma <- data.frame( study = c("Study1", "Study1", "Study1", "Study2", "Study2"), treatment = c("A", "B", "C", "A", "B"), event = c(10, 15, 12, 8, 14), n = c(100, 100, 100, 90, 90) ) pw <- pairwise(treatment, event = event, n = n, studlab = study, data = data_nma) ``` ``` -------------------------------- ### update() Method Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Reruns a meta-analysis with modified parameters, allowing for sensitivity analyses and parameter exploration without re-initializing the analysis. ```APIDOC ## update() Method ### Description Modifies one or more parameters and reruns the meta-analysis without needing to call the original function. Useful for sensitivity analyses and parameter exploration. ### Parameters - **object** (meta object) - Required - The original meta-analysis object. - **TE** (numeric vector) - Optional - New effect estimates. - **seTE** (numeric vector) - Optional - New standard errors. - **studlab** (character vector) - Optional - New study labels. - **common** (logical) - Optional - Change common effect setting. - **random** (logical) - Optional - Change random effects setting. - **method.tau** (character) - Optional - Change heterogeneity method. - **method.common.ci** (character) - Optional - Change common CI method. - **method.random.ci** (character) - Optional - Change random CI method. ### Return Value Updated meta object. ### Example ```r m <- metagen(TE, seTE, studlab = study, data = data, method.tau = "DL") # Rerun with different heterogeneity method m_reml <- update(m, method.tau = "REML") # Change to random effects only m_random <- update(m, common = FALSE, random = TRUE) ``` ``` -------------------------------- ### Query Meta-Analysis Settings Source: https://github.com/guido-s/meta/blob/develop/_autodocs/README.md Retrieve current meta-analysis settings. Use `settings.meta()` to view all settings or `gs("setting.name")` to query a specific parameter. ```r settings.meta() # All settings ``` ```r gs("method.tau") # Specific setting ``` -------------------------------- ### summary.meta() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Creates a summary object containing key results from a meta-analysis. The print method for this object displays results. ```APIDOC ## summary.meta() ### Description Creates a summary object containing key results. The print method for this object displays results. ### Signature ```r summary(object, common = object$common, random = object$random, prediction = object$prediction, ...) ``` ### Return Value **Type:** `summary.meta` object with components: - `common` - Common effect results - `random` - Random effects results - `heterogeneity` - I², Q, tau² - `prediction` - Prediction interval ``` -------------------------------- ### logit2p() - Back-transform from logit to proportion Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Inverse logit transformation (expit/logistic function) to convert logit values back to [0, 1]. ```APIDOC ## logit2p() ### Description Inverse logit transformation (expit/logistic function) to convert logit values back to [0, 1]. ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **x** (numeric vector) - Required - Logit-transformed values ### Response #### Success Response (200) - **Type:** numeric vector of proportions in [0, 1] ### Formula p = exp(x) / (1 + exp(x)) ``` -------------------------------- ### print.meta() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Prints a formatted summary of meta-analysis results, including pooled estimates, confidence intervals, heterogeneity statistics, and prediction intervals. ```APIDOC ## print.meta() ### Description Displays a formatted summary of meta-analysis results including pooled estimates, confidence intervals, heterogeneity statistics, and prediction intervals. ### Parameters - **x** (meta object) - Required - The meta-analysis result object. - **digits** (numeric) - Optional - Decimal places for estimates. Defaults to global setting. - **digits.se** (numeric) - Optional - Decimal places for standard errors. Defaults to global setting. - **common** (logical) - Optional - Whether to show common effect estimates. Defaults to `x$common`. - **random** (logical) - Optional - Whether to show random effects estimates. Defaults to `x$random`. - **prediction** (logical) - Optional - Whether to show prediction interval. Defaults to `x$prediction`. - **test** (logical) - Optional - Test for overall effect. Defaults to NULL. ### Return Value NULL (invisibly). Prints output as a side effect. ### Example ```r m <- metagen(TE, seTE, studlab = study, data = data) print(m) # Display results # Control output detail print(m, common = TRUE, random = TRUE, prediction = FALSE) ``` ``` -------------------------------- ### Access Meta-Analysis Object Attributes Source: https://github.com/guido-s/meta/blob/develop/_autodocs/README.md Demonstrates how to access key attributes of a meta-analysis object using the '$' notation. This is useful for retrieving specific results like pooled estimates, heterogeneity measures, or original data. ```r m$TE.random # Random effects estimate m$I2 # Heterogeneity index m$tau2 # Between-study variance m$data # Original input data ``` -------------------------------- ### Enable Prediction Intervals Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Use `settings.meta()` to enable the calculation and display of prediction intervals by default. This setting influences whether prediction intervals are automatically generated. ```r settings.meta(prediction = TRUE) ``` -------------------------------- ### print.summary.meta() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Displays summary statistics from a meta-analysis object, typically called by the summary() method. ```APIDOC ## print.summary.meta() ### Description Displays summary statistics from a meta-analysis object. Called by `summary()` method. ``` -------------------------------- ### drapery() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-visualization.md Creates a drapery plot to visualize the density of effect estimates across the range of observed values, offering insight into the distribution of study effects. ```APIDOC ## drapery() ### Description Drapery plot shows the density of effect estimates across the range of observed values, visualizing the distribution of study effects. ### Return Value **Type:** NULL (invisibly) ``` -------------------------------- ### Enable Random Effects Meta-Analysis Source: https://github.com/guido-s/meta/blob/develop/_autodocs/configuration.md Use `settings.meta()` to ensure random effects meta-analysis is enabled by default. This is the default behavior but can be explicitly set. ```r settings.meta(random = TRUE) ``` -------------------------------- ### Utility Functions Source: https://github.com/guido-s/meta/blob/develop/_autodocs/overview.md A collection of utility functions for managing settings, transformations, and formatting related to meta-analysis. ```APIDOC ## Utility Functions ### Description A collection of utility functions for managing settings, transformations, and formatting related to meta-analysis. ### Functions - **`settings.meta()`**: Queries or sets global meta-analysis defaults. - **`setvals(meta_object, ...)`**: Sets options within a meta object. - **`transf(data, transformation_function)`**: Applies a transformation function with metadata. - **`backtransf(transformed_data)`**: Back-transforms estimates. - **`gs()`**: Gets global settings. - **`traffic_light(rob_data)`**: Creates RoB traffic light plots. - **`rob(rob_data)`**: Performs Risk of Bias assessment. - **`JAMAlabels()`**: Formats labels for JAMA-style tables. - **`cilayout()`**: Configures confidence interval display options. - **`units2inches(value, unit)` / `inches2units(value, unit)`**: Converts between units and inches. - **`.forestArgs()`**: Accesses forest plot arguments (internal helper). ``` -------------------------------- ### API Data Import Methods Source: https://github.com/guido-s/meta/blob/develop/_autodocs/MANIFEST.md Handles data import from various formats and provides S3 method implementations for meta-analysis objects. ```APIDOC ## API Data Import Methods ### Description Handles data import from various formats and provides S3 method implementations for meta-analysis objects, including printing, summarizing, plotting, and data manipulation. ### Data Import Functions - `read.rm5()` - RevMan 5 XML format - `read.mtv()` - RevMan 5 data export - `read.cdir()` - Cochrane collaboration format ### S3 Methods - **Print methods:** `print.meta()`, `print.metabias()`, etc. - **Summary:** `summary.meta()` - **Plotting:** `plot.meta()`, `plot.cidprop()` - **Data frame conversion:** `as.data.frame.meta()` - **Subsetting:** `[.meta()`, `subset.meta()`, `[.pairwise()`, `[.longarm()` - **Extraction:** `weights.meta()`, `labels.meta()` - **Modification:** `update.meta()` - **Regression:** `coef()`, `fitted()`, `residuals()` ``` -------------------------------- ### Query and Set Meta-Analysis Defaults Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Use this function to retrieve current meta-analysis settings or establish new defaults for common effect, random effects, estimation methods, and confidence interval levels. Settings persist for subsequent analyses unless overridden. ```r # Query current settings current <- settings.meta() print(current) # Set new defaults settings.meta( common = FALSE, random = TRUE, method.tau = "REML", method.random.ci = "HK", level = 0.95 ) # All subsequent meta-analysis calls use these settings m <- metagen(TE, seTE, studlab = study, data = data) ``` -------------------------------- ### read.mtv() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Imports meta-analysis data from RevMan 5 data export files (.mtv or .csv). These are simpler text-based exports containing study-level summary data. ```APIDOC ## read.mtv() ### Description Imports meta-analysis data from RevMan 5 data export files (.mtv or .csv). These are simpler text-based exports containing study-level summary data. ### Signature ```r read.mtv(file, sep = ";", ...) ``` ### Parameters #### Path Parameters - **file** (character) - Yes - Description: Path to .mtv or .csv file - **sep** (character) - No - Default: ";" - Description: Field separator (typically ";" for mtv) #### Other Parameters - **...** (—) - — - Description: Additional arguments passed to read.csv ### Return Value **Type:** data.frame containing: - Study identifiers and characteristics - Outcome data (events, totals, means, SDs as applicable) - Analysis specifications if included ``` -------------------------------- ### weights() Method Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Extracts study-level weights from meta-analysis for common and/or random effects models. Weights are returned as percentages summing to 100 across studies. ```APIDOC ## weights() Method ### Description Extracts study-level weights from meta-analysis for common effect and/or random effects models. ### Parameters - **object** (meta object) - Required - The meta-analysis result object. - **common** (logical) - Optional - Defaults to `object$common`. Whether to extract common effect weights. - **random** (logical) - Optional - Defaults to `object$random`. Whether to extract random effects weights. ### Return Value Numeric matrix with columns `w.common` (if common=TRUE) and `w.random` (if random=TRUE). Weights are percentages (0-100) summing to 100 across studies. ### Example ```r m <- metagen(TE, seTE, studlab = study, data = data) # Get all weights w <- weights(m) # Get only random effects weights w_random <- weights(m, common = FALSE, random = TRUE) ``` ``` -------------------------------- ### read.rm5() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Imports meta-analysis data from RevMan 5 XML format (.rm5 files). Parses the XML structure and extracts study data, outcome definitions, and meta-analysis specifications. ```APIDOC ## read.rm5() ### Description Imports meta-analysis data from RevMan 5 XML format (.rm5 files). Parses the XML structure and extracts study data, outcome definitions, and meta-analysis specifications. ### Signature ```r read.rm5(file, ...) ``` ### Parameters #### Path Parameters - **file** (character) - Required - Path to .rm5 file - **...** (-) - - Additional arguments ### Return Value **Type:** `rm5` object (S3 list) containing: - `data` - Data frame with extracted study data - `studies` - Study identifiers - `outcomes` - Outcome definitions - `comparisons` - Comparison specifications - Metadata about analyses present in the file ### Example ```r # Import RevMan 5 file review_data <- read.rm5("cochrane_review.rm5") # Access study data head(review_data$data) # Examine available outcomes names(review_data$outcomes) # Use in meta-analysis m <- metabin(event.e = event.e, n.e = n.e, event.c = event.c, n.c = n.c, studlab = study, data = review_data$data) ``` ``` -------------------------------- ### plot.cidprop() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-data-import-methods.md Visualizes confidence intervals for proportions. ```APIDOC ## plot.cidprop() ### Description Visualizes confidence intervals for proportions. ``` -------------------------------- ### cilayout() Source: https://github.com/guido-s/meta/blob/develop/_autodocs/api-transformation-utilities.md Controls display of confidence interval labels in forest plots and tables. ```APIDOC ## cilayout() ### Description Controls display of confidence interval labels in forest plots and tables. ### Signature ```r cilayout(show.ci.label, ...) ``` ### Method Not specified (R function) ### Endpoint Not applicable (R function) ### Parameters * **show.ci.label**: Controls whether confidence interval labels are shown. * **...**: Additional arguments. ### Request Example `cilayout(show.ci.label = TRUE)` ### Response Returns settings for confidence interval label display. ```