| Title: | Dose-Response Meta-Regression for Meta-Analysis |
|---|---|
| Description: | Conducting linear and nonlinear dose-response meta-regression using study-level summary data. It supports both continuous and binary outcomes and allows modeling of dose-effect relationships using linear trends or nonlinear restricted cubic splines. The package is designed to facilitate transparent, flexible, and reproducible dose-response meta-analyses, with built-in visualization of fitted dose-response curves. |
| Authors: | Ahmed Abdelmageed [cre, aut]
|
| Maintainer: | Ahmed Abdelmageed <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.1 |
| Built: | 2026-05-22 05:56:24 UTC |
| Source: | https://github.com/asmpro7/metadose |
The 'MetaDose' package provides tools for conducting linear and nonlinear dose-response meta-regression using study-level summary data. It supports both continuous and binary outcomes and allows modeling of dose-effect relationships using linear trends or nonlinear restricted cubic splines.
The package is designed to facilitate transparent, flexible, and reproducible dose-response meta-analyses, with built-in visualization of fitted dose-response curves.
Ahmed Abdelmageed [email protected]
Useful functions:
mdcont for dose-response meta-regression with continuous outcomes.
mdbin for dose-response meta-regression with binary outcomes.
S3 methods for objects of class 'dose' returned by 'mdcont()' and 'mdbin()' functions.
print.dose displays summaries of the fitted linear and/or
nonlinear dose-response meta-regression models.
plot.dose visualizes the fitted dose-response curves produced
by the meta-regression models.
## S3 method for class 'dose' print(x, model = c("both", "linear", "nonlinear"), ...) ## S3 method for class 'dose' plot(x, model = c("both", "linear", "nonlinear"), ...)## S3 method for class 'dose' print(x, model = c("both", "linear", "nonlinear"), ...) ## S3 method for class 'dose' plot(x, model = c("both", "linear", "nonlinear"), ...)
x |
|
model |
Character string specifying which model results to display.
Options are |
... |
Additional arguments (currently unused). |
Both methods are called for their side effects.
print.dose prints model summaries to the console.
plot.dose draws dose-response plots in the active graphics device.
The original object x is returned invisibly.
Ahmed Abdelmageed [email protected]
Performs linear and/or nonlinear dose-response meta-regression for binary outcomes using study-level event data. The function supports relative risk ('RR') and odds ratio ('OR') effect measures and models the association between dose levels and treatment effects.
mdbin( measure = c("RR", "OR"), event.e, n.e, event.c, n.c, dose, data, linear = TRUE, nonlinear = TRUE, x_axis = "Dose", y_axis = "Measured Effect", knots = c(0.1, 0.5, 0.9) )mdbin( measure = c("RR", "OR"), event.e, n.e, event.c, n.c, dose, data, linear = TRUE, nonlinear = TRUE, x_axis = "Dose", y_axis = "Measured Effect", knots = c(0.1, 0.5, 0.9) )
measure |
Character string specifying the effect size measure.
Options are |
event.e |
Numeric vector of numbers of events in the experimental group. |
n.e |
Numeric vector of sample sizes in the experimental group. |
event.c |
Numeric vector of numbers of events in the control group. |
n.c |
Numeric vector of sample sizes in the control group. |
dose |
Numeric vector of dose levels corresponding to each study. |
data |
A data frame containing the meta-analysis data. |
linear |
Logical; if |
nonlinear |
Logical; if |
x_axis |
Character string specifying the x-axis label for plots. |
y_axis |
Character string specifying the y-axis label for plots. |
knots |
Numeric vector of quantiles used to place knots for the nonlinear restricted cubic spline model. |
The function computes logarithmic effect sizes and corresponding sampling variances from binary outcome data. Linear and/or nonlinear dose-response meta-regression models are then fitted, with nonlinear relationships modeled using restricted cubic splines. Dose-response plots are generated to visualize the fitted associations.
An S3 object of class 'dose', which is a list containing:
linear_model |
The fitted linear dose-response meta-regression model. |
linear_plot |
A plot of the linear dose-response relationship. |
nonlinear_model |
The fitted nonlinear dose-response meta-regression model. |
nonlinear_plot |
A plot of the nonlinear dose-response relationship. |
Ahmed Abdelmageed [email protected]
mdcont for dose-response meta-regression with continuous outcomes.
Performs linear and/or nonlinear dose-response meta-regression for continuous outcomes using study-level summary data. The function supports mean difference ('MD') and standardized mean difference ('SMD') effect measures and fits models across different dose levels using meta-regression techniques.
mdcont( measure = c("MD", "SMD"), mean.e, sd.e, n.e, mean.c, sd.c, n.c, dose, data, linear = TRUE, nonlinear = TRUE, x_axis = "Dose", y_axis = "Measured Effect", knots = c(0.1, 0.5, 0.9) )mdcont( measure = c("MD", "SMD"), mean.e, sd.e, n.e, mean.c, sd.c, n.c, dose, data, linear = TRUE, nonlinear = TRUE, x_axis = "Dose", y_axis = "Measured Effect", knots = c(0.1, 0.5, 0.9) )
measure |
Character string specifying the effect size measure.
Options are |
mean.e |
Numeric vector of means in the experimental group. |
sd.e |
Numeric vector of standard deviations in the experimental group. |
n.e |
Numeric vector of sample sizes in the experimental group. |
mean.c |
Numeric vector of means in the control group. |
sd.c |
Numeric vector of standard deviations in the control group. |
n.c |
Numeric vector of sample sizes in the control group. |
dose |
Numeric vector of dose levels corresponding to each study. |
data |
A data frame containing the meta-analysis data. |
linear |
Logical; if |
nonlinear |
Logical; if |
x_axis |
Character string specifying the x-axis label for plots. |
y_axis |
Character string specifying the y-axis label for plots. |
knots |
Numeric vector of quantiles used to place knots for the nonlinear restricted cubic spline model. |
The function first computes effect sizes and their variances from continuous outcome data. It then fits a linear dose-response meta-regression model and/or a nonlinear model using restricted cubic splines, depending on user selection. Corresponding dose-response plots are generated for visualization.
An S3 object of class 'dose', which is a list containing:
linear_model |
The fitted linear dose-response meta-regression model. |
linear_plot |
A plot of the linear dose-response relationship. |
nonlinear_model |
The fitted nonlinear dose-response meta-regression model. |
nonlinear_plot |
A plot of the nonlinear dose-response relationship. |
Ahmed Abdelmageed [email protected]
mdbin for dose-response meta-regression with binary outcomes.
# Create a small example dataset study_data <- data.frame( mean.e = c(5.2, 6.1, 7.0, 6.5), sd.e = c(1.1, 1.3, 1.2, 1.0), n.e = c(40, 35, 50, 45), mean.c = c(4.8, 5.5, 6.2, 5.9), sd.c = c(1.0, 1.2, 1.1, 1.1), n.c = c(38, 33, 48, 42), dose = c(10, 20, 30, 40) ) # Fit a dose-response meta-regression model res <- mdcont( measure = "MD", mean.e = mean.e, sd.e = sd.e, n.e = n.e, mean.c = mean.c, sd.c = sd.c, n.c = n.c, dose = dose, data = study_data, linear = TRUE, nonlinear = TRUE ) # Print results print(res) # Access components # res$linear_model # res$nonlinear_model# Create a small example dataset study_data <- data.frame( mean.e = c(5.2, 6.1, 7.0, 6.5), sd.e = c(1.1, 1.3, 1.2, 1.0), n.e = c(40, 35, 50, 45), mean.c = c(4.8, 5.5, 6.2, 5.9), sd.c = c(1.0, 1.2, 1.1, 1.1), n.c = c(38, 33, 48, 42), dose = c(10, 20, 30, 40) ) # Fit a dose-response meta-regression model res <- mdcont( measure = "MD", mean.e = mean.e, sd.e = sd.e, n.e = n.e, mean.c = mean.c, sd.c = sd.c, n.c = n.c, dose = dose, data = study_data, linear = TRUE, nonlinear = TRUE ) # Print results print(res) # Access components # res$linear_model # res$nonlinear_model