| Title: | Just a Rather Bayesian Evidence Synthesis |
|---|---|
| Description: | Provides a new class of Bayesian meta-analysis models that incorporates a model for internal and external validity bias. In this way, it is possible to combine studies of diverse quality and different types. For example, we can combine the results of randomized control trials (RCTs) with the results of observational studies (OS). |
| Authors: | Pablo Emilio Verde [aut, cre] |
| Maintainer: | Pablo Emilio Verde <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 2.5.0 |
| Built: | 2026-05-22 05:54:50 UTC |
| Source: | https://github.com/cran/jarbes |
Meta-analysis of 29 studies on the effect of different methods of acupuncture Therapy for depression compared to usual care control groups by pooling data from RCTs.
A dataframe with 29 rows and 11 columns. Each row represents study results, the columns are:
Author and year.
changes in severity between intervention and control groups calculated using Hedges´g statistic
Standard Error of Hedges´g
treatment administered
control group treatment
origin country of the study
total amount of patients per study
number of treatments received per study
fixed: same acupuncture points used at each session; semi-fixed: some points pre-defined, some selected on the basis of the diagnosis/symptoms (location and amount); individualised: location and amount of points selected on basis of the diagnosis/symptoms
amount of acupuncture points for fixed-points-studies
NICMAN scale Points to evaluate the Quality of the administered acupuncture
Risk of selection bias (Random sequence generation) low risk of bias: high, high risk: low, unclear: unclear
Risk of selection bias (allocation concealment) low risk of bias: high, high risk: low, unclear: unclear
Risk of performance bias (blinding of participants and personnel) low risk of bias: high, high risk: low, unclear: unclear
Risk of detection bias (blinding oft outcome assessment) low risk of bias: high, high risk: low, unclear: unclear
Risk of attrition bias (incomplete outcome data) low risk of bias: high, high risk: low, unclear: unclear
Risk of reporting bias (selective reporting) low risk of bias: high, high risk: low, unclear: unclear
Risk of other biases; low risk of bias: high, high risk: low, unclear: unclear
Armour M, Smith CA, Wang LQ, Naidoo D, Yang GY, MacPherson H, Lee MS, Hay P. Acupuncture for Depression: A Systematic Review and Meta-Analysis. J Clin Med. 2019 Jul 31;8(8):1140. doi: 10.3390/jcm8081140. PMID: 31370200; PMCID: PMC6722678.
Meta-analysis of RCTs evaluating the effect of AI agents to reduce psychological distress effects
A data frame with 21 RCT studies #'
Study identifier.
Treatment effect reported; standardized mean difference with Hedges small-sample correction (Hedges' g).
Standard error of TE, derived from the plotted 95% confidence interval using seTE = (upper - lower) / (2 * 1.96). Confidence intervals are not stored.
Overall Risk of Bias assessment reported in the plot ("Low risk of bias", "Some concerns", "High risk of bias").
Bleidorn, W., Schwaba, T., Zheng, A., Hopwood, C. J., Sosa, S. S., Roberts, B. W., & Briley, D. A. (2022). Personality stability and change: A meta-analysis of longitudinal studies. Psychological Bulletin, 148(7-8), 588–619. https://doi.org/10.3037/bul0000365
This function performers a Bayesian meta-analysis
b3lmeta( data, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, scale.sigma.within = 0.5, df.scale.within = 1, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )b3lmeta( data, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, scale.sigma.within = 0.5, df.scale.within = 1, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least three columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. 3) design = indicates study type or clustering subgroup. |
mean.mu.0 |
Prior mean of the overall mean parameter mu.0 (mean across designs), default value is 0. |
sd.mu.0 |
Prior standard deviation of mu.0 (mean across designs), the default value is 10. |
scale.sigma.between |
Prior scale parameter for scale gamma distribution for the precision between study types. The default value is 0.5. |
df.scale.between |
Degrees of freedom of the scale gamma distribution for the precision between study types. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
scale.sigma.within |
Prior scale parameter for scale gamma distribution for the precision within study types. The default value is 0.5. |
df.scale.within |
Degrees of freedom of the scale gamma distribution for the precision within study types. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcmeta can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "bmeta". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E. (2021) A Bias-Corrected Meta-Analysis Model for Combining Studies of Different Types and Quality. Biometrical Journal; 1–17.
## Not run: library(jarbes) ## End(Not run)## Not run: library(jarbes) ## End(Not run)
This function performs a Bias Corrected Bayesian Nonparametric meta-analysis and meta-regression using a DPM of Normal distributions to the bias process
bcbnp( data, formula = ~1, mean.mu.theta = 0, sd.mu.theta = 10, scale.sigma.between = 0.5, df.scale.between = 1, mean.mu.k = 0, sd.mu.k = 10, g.0 = 0.5, g.1 = 0.5, a.0 = 0.5, a.1 = 1, alpha.0 = 0.5, alpha.1 = 2, K = 10, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )bcbnp( data, formula = ~1, mean.mu.theta = 0, sd.mu.theta = 10, scale.sigma.between = 0.5, df.scale.between = 1, mean.mu.k = 0, sd.mu.k = 10, g.0 = 0.5, g.1 = 0.5, a.0 = 0.5, a.1 = 1, alpha.0 = 0.5, alpha.1 = 2, K = 10, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
formula |
A formula for meta-regression (e.g., ~ x1 + x2). Use ~ 1 for no covariates. |
mean.mu.theta |
Prior mean of mu.theta, the default value is mean.mu.0 = 0. |
sd.mu.theta |
Prior standard deviation of mu.theta, the default value is 10^-6. |
scale.sigma.between |
Prior for tau.theta: Scale parameter for scale.gamma distribution for the precision 1/tau.theta^2 between studies. The default value is 0.5. |
df.scale.between |
Prior for tau.theta: Degrees of freedom of the scale.gamma distribution for the precision 1/tau.theta^2 between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies tau.theta. Larger values e.g. 30 corresponds to a Half Normal distribution. |
mean.mu.k |
Prior mean for the mean mu.k bias cluster components. The default value is 0. |
sd.mu.k |
Prior standard deviation for mu.k bias cluster component. The default is 10. |
g.0 |
Shape parameter the prior of the precision tau.k. The default value is 0.5 (tau.k~ dgamma(shape, rate)) |
g.1 |
Rate parameter the prior of the precision tau.k. The default value is 0.5 (tau.k~ dgamma(shape, rate)) |
a.0 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a0 = 0.5. |
a.1 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a1 = 1. |
alpha.0 |
Lower bound of the uniform prior for the concentration parameter for the DP, the default value is 0.5. |
alpha.1 |
Upper bound of the uniform prior for the concentration parameter for the DP, the default value depends on the sample size, see the example below. We give as working value alpha.1 = 2 |
K |
Maximum number of clusters in the DPM, the default value depends on alpha.1, see the example below. We give as working value K = 10. |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcbnp can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "bcbnp". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E., and Rosner, G.L. (2025a), A Bias-Corrected Bayesian Nonparametric Model for Combining Studies With Varying Quality in Meta-Analysis. Biometrical Journal., 67: e70034. https://doi.org/10.1002/bimj.70034
Verde, P.E, and Rosner, G.L. (2025b), jarbes: an R package for bias corrected meta-analysis models
## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect # Beta(0.5, 1) a.0 = 0.5 a.1 = 1 # alpha.max N = dim(stemcells)[1] alpha.max = 1/5 *((N-1)*a.0 - a.1)/(a.0 + a.1) alpha.max # K.max K.max = 1 + 5*alpha.max K.max = round(K.max) K.max set.seed(20233) bcbnp.stemcell = bcbnp(stemcells alpha.0 = 0.5, alpha.1 = alpha.max, a.0 = a.0, a.1 = a.1, K = K.max, nr.chains = 4, nr.iterations = 50000, nr.adapt = 1000, nr.burnin = 10000, nr.thin = 4) ## End(Not run)## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect # Beta(0.5, 1) a.0 = 0.5 a.1 = 1 # alpha.max N = dim(stemcells)[1] alpha.max = 1/5 *((N-1)*a.0 - a.1)/(a.0 + a.1) alpha.max # K.max K.max = 1 + 5*alpha.max K.max = round(K.max) K.max set.seed(20233) bcbnp.stemcell = bcbnp(stemcells alpha.0 = 0.5, alpha.1 = alpha.max, a.0 = a.0, a.1 = a.1, K = K.max, nr.chains = 4, nr.iterations = 50000, nr.adapt = 1000, nr.burnin = 10000, nr.thin = 4) ## End(Not run)
This function performers a Bias Corrected Bayesian Nonparametric meta-analysis and meta-regression using a DPM of Normal distributions to the bias process
bcbnp_0( data, mean.mu.theta = 0, sd.mu.theta = 10, scale.sigma.between = 0.5, df.scale.between = 1, mean.mu.k = 0, sd.mu.k = 10, g.0 = 0.5, g.1 = 0.5, a.0 = 0.5, a.1 = 1, alpha.0 = 0.5, alpha.1 = 2, K = 10, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )bcbnp_0( data, mean.mu.theta = 0, sd.mu.theta = 10, scale.sigma.between = 0.5, df.scale.between = 1, mean.mu.k = 0, sd.mu.k = 10, g.0 = 0.5, g.1 = 0.5, a.0 = 0.5, a.1 = 1, alpha.0 = 0.5, alpha.1 = 2, K = 10, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
mean.mu.theta |
Prior mean of mu.theta, the default value is mean.mu.0 = 0. |
sd.mu.theta |
Prior standard deviation of mu.theta, the default value is 10^-6. |
scale.sigma.between |
Prior for tau.theta: Scale parameter for scale.gamma distribution for the precision 1/tau.theta^2 between studies. The default value is 0.5. |
df.scale.between |
Prior for tau.theta: Degrees of freedom of the scale.gamma distribution for the precision 1/tau.theta^2 between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies tau.theta. Larger values e.g. 30 corresponds to a Half Normal distribution. |
mean.mu.k |
Prior mean for the mean mu.k bias cluster components. The default value is 0. |
sd.mu.k |
Prior standard deviation for mu.k bias cluster component. The default is 10. |
g.0 |
Shape parameter the prior of the precision tau.k. The default value is 0.5 (tau.k~ dgamma(shape, rate)) |
g.1 |
Rate parameter the prior of the precision tau.k. The default value is 0.5 (tau.k~ dgamma(shape, rate)) |
a.0 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a0 = 0.5. |
a.1 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a1 = 1. |
alpha.0 |
Lower bound of the uniform prior for the concentration parameter for the DP, the default value is 0.5. |
alpha.1 |
Upper bound of the uniform prior for the concentration parameter for the DP, the default value depends on the sample size, see the example below. We give as working value alpha.1 = 2 |
K |
Maximum number of clusters in the DPM, the default value depends on alpha.1, see the example below. We give as working value K = 10. |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcbnp can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "bcbnp". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E., and Rosner, G.L. (2025a), A Bias-Corrected Bayesian Nonparametric Model for Combining Studies With Varying Quality in Meta-Analysis. Biometrical Journal., 67: e70034. https://doi.org/10.1002/bimj.70034
Verde, P.E, and Rosner, G.L. (2025b), jarbes: an R package for bias corrected meta-analysis models
## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect # Beta(0.5, 1) a.0 = 0.5 a.1 = 1 # alpha.max N = dim(stemcells)[1] alpha.max = 1/5 *((N-1)*a.0 - a.1)/(a.0 + a.1) alpha.max # K.max K.max = 1 + 5*alpha.max K.max = round(K.max) K.max set.seed(20233) bcbnp.stemcell = bcbnp(stemcells alpha.0 = 0.5, alpha.1 = alpha.max, a.0 = a.0, a.1 = a.1, K = K.max, nr.chains = 4, nr.iterations = 50000, nr.adapt = 1000, nr.burnin = 10000, nr.thin = 4) ## End(Not run)## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect # Beta(0.5, 1) a.0 = 0.5 a.1 = 1 # alpha.max N = dim(stemcells)[1] alpha.max = 1/5 *((N-1)*a.0 - a.1)/(a.0 + a.1) alpha.max # K.max K.max = 1 + 5*alpha.max K.max = round(K.max) K.max set.seed(20233) bcbnp.stemcell = bcbnp(stemcells alpha.0 = 0.5, alpha.1 = alpha.max, a.0 = a.0, a.1 = a.1, K = K.max, nr.chains = 4, nr.iterations = 50000, nr.adapt = 1000, nr.burnin = 10000, nr.thin = 4) ## End(Not run)
This function performers a Bayesian meta-analysis with DP as random effects
bcdpmeta( data, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, B.lower = 0, B.upper = 10, a.0 = 1, a.1 = 1, alpha.0 = 0.03, alpha.1 = 10, K = 30, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )bcdpmeta( data, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, B.lower = 0, B.upper = 10, a.0 = 1, a.1 = 1, alpha.0 = 0.03, alpha.1 = 10, K = 30, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
mean.mu.0 |
Prior mean of the mean of the base distribution default value is mean.mu.0 = 0. |
sd.mu.0 |
Prior standard deviation of the base distribution, the default value is 10. |
scale.sigma.between |
Prior scale parameter for scale gamma distribution for the precision between studies. The default value is 0.5. |
df.scale.between |
Degrees of freedom of the scale gamma distribution for the precision between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
B.lower |
Lower bound of the bias parameter B, the default value is 0. |
B.upper |
Upper bound of the bias parameter B, the default value is 10. |
a.0 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a0 = 1. |
a.1 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a1 = 1. |
alpha.0 |
Lower bound of the uniform prior for the concentration parameter for the DPM, default value is alpha.0 = 0.03. |
alpha.1 |
Upper bound of the uniform prior for the concentration parameter for the DPM, default value is alpha.1 = 10. |
K |
Maximum number of clusters in the DPM, default value is K = 30. |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcdpmeta can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "bcdpmeta". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E. (2021) A Bias-Corrected Meta-Analysis Model for Combining Studies of Different Types and Quality. Biometrical Journal; 1–17.
## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect bm1 = bcdpmeta(stemcells) summary(bm1) ## End(Not run)## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect bm1 = bcdpmeta(stemcells) summary(bm1) ## End(Not run)
This function performers a Bayesian cross design synthesis. The function fits a hierarchical meta-regression model based on a BC-BNP model
bchmr( data, two.by.two = TRUE, dataIPD, re = "normal", mean.mu.1 = 0, mean.mu.2 = 0, mean.mu.phi = 0, sd.mu.1 = 1, sd.mu.2 = 1, sd.mu.phi = 1, sigma.1.upper = 5, sigma.2.upper = 5, sigma.beta.upper = 5, mean.Fisher.rho = 0, sd.Fisher.rho = 1/sqrt(2), nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )bchmr( data, two.by.two = TRUE, dataIPD, re = "normal", mean.mu.1 = 0, mean.mu.2 = 0, mean.mu.phi = 0, sd.mu.1 = 1, sd.mu.2 = 1, sd.mu.phi = 1, sigma.1.upper = 5, sigma.2.upper = 5, sigma.beta.upper = 5, mean.Fisher.rho = 0, sd.Fisher.rho = 1/sqrt(2), nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
Aggregated data results: a data frame where the first four columns containing the number of events in the control group (yc), the number of patients in the control group (nc), the number of events in the treatment group (yt) and the number of patients in the treatment group (nt). If two.by.two = TRUE a data frame where each line contains the trial results with column names: yc, nc, yt, nt. |
two.by.two |
If TRUE indicates that the trial results are with names: yc, nc, yt, nt. |
dataIPD |
Individual participant data: a data frame where the first column is the outcome variable and the other columns represent individual participant charachteristics. |
re |
Random effects distribution for the resulting model. Possible values are normal for bivariate random effects and sm for scale mixtures. |
mean.mu.1 |
Prior mean of baseline risk, default value is 0. |
mean.mu.2 |
Prior mean of treatment effect, default value is 0. |
mean.mu.phi |
Prior mean of the bias parameter which measures the difference between the baseline mean mu.1 and the intercept parameter of the logistic regression of the individual participant data. The defalut vaule is 0. |
sd.mu.1 |
Prior standard deviation of mu.1, default value is 1. The default prior of mu.1 is a logistic distribution with mean 0 and dispersion 1. The implicit prior for mu.1 in the probability scale is a uniform between 0 and 1. |
sd.mu.2 |
Prior standard deviation of mu.2, default value is 1. The default prior of mu.2 is a logistic distribution with mean 0 and dispersion 1. The implicit prior for mu.2 in the probability scale is a uniform between 0 and 1. |
sd.mu.phi |
Prior standard deviation of mu.phi, default value is 1. |
sigma.1.upper |
Upper bound of the uniform prior of sigma.1, default value is 5. |
sigma.2.upper |
Upper bound of the uniform prior of sigma.2, default value is 5. |
sigma.beta.upper |
Upper bound of the uniform prior of sigma.beta, default value is 5. |
mean.Fisher.rho |
Mean of rho in the Fisher scale, default value is 0. |
sd.Fisher.rho |
Standard deviation of rho in the Fisher scale, default value is 1/sqrt(2). |
nr.chains |
Number of chains for the MCMC computations, default 5. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discarded for burnin period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The model is experimental and under construction for the version 2.2.5 (March 2025)
This function returns an object of the class "bchmr". This object contains the MCMC output of each parameter and hyper-parameter in the model, the data frame used for fitting the model, and further model outputs.
The results of the object of the class hmr can be extracted with R2jags. In addition a summary, a print and a plot function are implemented for this type of object.
Verde, P. E. (2019) Learning from Clinical Evidence: The Hierarchical Meta-Regression Approach. Biometrical Journal. Biometrical Journal; 1-23.
Verde, P.E., and Rosner, G.L. (2025), A Bias-Corrected Bayesian Nonparametric Model for Combining Studies With Varying Quality in Meta-Analysis. Biometrical Journal., 67: e70034. https://doi.org/10.1002/bimj.70034
## Not run: library(jarbes) data("healing") AD <- healing[, c("y_c", "n_c", "y_t", "n_t")] data("healingipd") IPD <- healingipd[, c("healing.without.amp", "PAD", "neuropathy", "first.ever.lesion", "no.continuous.care", "male", "diab.typ2", "insulin", "HOCHD", "HOS", "CRF", "dialysis", "DNOAP", "smoking.ever", "diabdur", "wagner.class")] mx1 <- bchmr(AD, two.by.two = FALSE, dataIPD = IPD, re = "normal", sd.mu.1 = 2, sd.mu.2 = 2, sd.mu.phi = 2, sigma.1.upper = 5, sigma.2.upper = 5, sigma.beta.upper = 5, sd.Fisher.rho = 1.25, df.estimate = FALSE, df.lower = 3, df.upper = 10, nr.chains = 1, nr.iterations = 1500, nr.adapt = 100, nr.thin = 1) print(mx1) # End of the examples. ## End(Not run)## Not run: library(jarbes) data("healing") AD <- healing[, c("y_c", "n_c", "y_t", "n_t")] data("healingipd") IPD <- healingipd[, c("healing.without.amp", "PAD", "neuropathy", "first.ever.lesion", "no.continuous.care", "male", "diab.typ2", "insulin", "HOCHD", "HOS", "CRF", "dialysis", "DNOAP", "smoking.ever", "diabdur", "wagner.class")] mx1 <- bchmr(AD, two.by.two = FALSE, dataIPD = IPD, re = "normal", sd.mu.1 = 2, sd.mu.2 = 2, sd.mu.phi = 2, sigma.1.upper = 5, sigma.2.upper = 5, sigma.beta.upper = 5, sd.Fisher.rho = 1.25, df.estimate = FALSE, df.lower = 3, df.upper = 10, nr.chains = 1, nr.iterations = 1500, nr.adapt = 100, nr.thin = 1) print(mx1) # End of the examples. ## End(Not run)
This function performs a Bayesian meta-analysis to jointly combine different types of studies. The random-effects follows a finite mixture of normal distributions.
bcmeta( data, mean.mu.theta = 0, sd.mu.theta = 10, scale.sigma.between = 0.5, df.scale.between = 1, B.lower = 0, B.upper = 10, a.0 = 1, a.1 = 1, nu = 0.5, nu.estimate = FALSE, b.0 = 1, b.1 = 2, preclassification = "right", inits = NULL, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )bcmeta( data, mean.mu.theta = 0, sd.mu.theta = 10, scale.sigma.between = 0.5, df.scale.between = 1, B.lower = 0, B.upper = 10, a.0 = 1, a.1 = 1, nu = 0.5, nu.estimate = FALSE, b.0 = 1, b.1 = 2, preclassification = "right", inits = NULL, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
mean.mu.theta |
Prior mean of the overall mean parameter mu, default value is 0. |
sd.mu.theta |
Prior standard deviation of mu, the default value is 10. |
scale.sigma.between |
Prior scale parameter for scale gamma distribution for the precision between studies. The default value is 0.5. |
df.scale.between |
Degrees of freedom of the scale gamma distribution for the precision between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
B.lower |
Lower bound of the bias parameter B, the default value is 0. |
B.upper |
Upper bound of the bias parameter B, the default value is 10. |
a.0 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a0 = 1. |
a.1 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a1 = 1. |
nu |
Parameter for the Beta distribution for the quality weights. The default value is nu = 0.5. |
nu.estimate |
If TRUE, then we estimate nu from the data. |
b.0 |
If nu.estimate = TRUE, this parameter is the shape parameter of the prior Gamma distribution for nu. |
b.1 |
If nu.estimate = TRUE, this parameter is the rate parameter of the prior Gamma distribution for nu. Note that E(nu) = b.0/b.1 and we need to choose b.0 << b.1. |
preclassification |
Controls optional pre-classification of the latent
bias indicators
If |
inits |
Optional initial values for MCMC chains, passed to |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, defualt is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discared for burnin period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcmeta can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "bcmeta". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P. E. (2017) Two Examples of Bayesian Evidence Synthesis with the Hierarchical Meta-Regression Approach. Chap.9, pag 189-206. Bayesian Inference, ed. Tejedor, Javier Prieto. InTech.
Verde, P.E. (2021) A Bias-Corrected Meta-Analysis Model for Combining Studies of Different Types and Quality. Biometrical Journal; 1–17.
## Not run: library(jarbes) # Example ppvipd data data(ppvipd) ## End(Not run)## Not run: library(jarbes) # Example ppvipd data data(ppvipd) ## End(Not run)
This function performers a Bayesian meta-analysis with DPM as random effects
bcmixmeta( data, mean.mu.theta = 0, sd.mu.theta = 10, scale.sigma.between = 0.5, df.scale.between = 1, scale.sigma.beta = 0.5, df.scale.beta = 1, preclassification = "right", B.lower = -15, B.upper = 15, a.0 = 0.5, a.1 = 1, alpha.0 = 0.03, alpha.1 = 2, K = 10, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )bcmixmeta( data, mean.mu.theta = 0, sd.mu.theta = 10, scale.sigma.between = 0.5, df.scale.between = 1, scale.sigma.beta = 0.5, df.scale.beta = 1, preclassification = "right", B.lower = -15, B.upper = 15, a.0 = 0.5, a.1 = 1, alpha.0 = 0.03, alpha.1 = 2, K = 10, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
mean.mu.theta |
Prior mean of the mean of the base distribution default value is mean.mu.theta = 0. |
sd.mu.theta |
Prior standard deviation of the base distribution, the default value is 10^-6. |
scale.sigma.between |
Prior scale parameter for scale gamma distribution for the precision between studies. The default value is 0.5. |
df.scale.between |
Degrees of freedom of the scale gamma distribution for the precision between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
scale.sigma.beta |
Prior scale parameter for the scale.gamma distribution for the precision between study biases. |
df.scale.beta |
Degrees of freedom of the scale gamma distribution for the precision between study biases. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between biases. |
preclassification |
Controls optional pre-classification of the latent
bias indicators
|
B.lower |
Lower bound of the bias parameter B, the default value is -15. |
B.upper |
Upper bound of the bias parameter B, the default value is 15. |
a.0 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a0 = 0.5. |
a.1 |
Parameter for the prior Beta distribution for the probability of bias. Default value is a1 = 1. |
alpha.0 |
Lower bound of the uniform prior for the concentration parameter for the DP, the default value is 0.5. |
alpha.1 |
Upper bound of the uniform prior for the concentration parameter for the DP, the default value depends on the sample size, see the example below. We give as working value alpha.1 = 2 |
K |
Maximum number of clusters in the DP, the default value depends on alpha.1, see the example below. We give as working value K = 10. |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcmixmeta can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "bcmixmeta". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E., and Rosner, G.L. (2025), A Bias-Corrected Bayesian Nonparametric Model for Combining Studies With Varying Quality in Meta-Analysis. Biometrical Journal., 67: e70034. https://doi.org/10.1002/bimj.70034
## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect # Beta(0.5, 1) a.0 = 0.5 a.1 = 1 # alpha.max N = dim(stemcells)[1] alpha.max = 1/5 *((N-1)*a.0 - a.1)/(a.0 + a.1) alpha.max # K.max K.max = 1 + 5*alpha.max K.max = round(K.max) K.max set.seed(20233) bcmix.2.stemcell = bcmixmeta(stemcells, mean.mu.theta=0, sd.mu.theta=100, B.lower = -15, B.upper = 15, alpha.0 = 0.5, alpha.1 = alpha.max, a.0 = a.0, a.1 = a.1, K = K.max, df.scale.between = 1, scale.sigma.between = 0.5, nr.chains = 4, nr.iterations = 50000, nr.adapt = 1000, nr.burnin = 10000, nr.thin = 4) diagnostic(bcmix.2.stemcell, y.lim = c(-1, 15), title.plot = "Default priors") bcmix.2.stemcell.mcmc <- as.mcmc(bcmix.1.stemcell$BUGSoutput$sims.matrix) theta.names <- paste(paste("theta[",1:31, sep=""),"]", sep="") theta.b.names <- paste(paste("theta.bias[",1:31, sep=""),"]", sep="") theta.b.greek.names <- paste(paste("theta[",1:31, sep=""),"]^B", sep="") theta.greek.names <- paste(paste("theta[",1:31, sep=""),"]", sep="") caterplot(bcmix.2.stemcell.mcmc, parms = theta.names, # theta labels = theta.greek.names, greek = T, labels.loc="axis", cex =0.7, col = "black", style = "plain", reorder = F, val.lim =c(-6, 16), quantiles = list(outer=c(0.05,0.95),inner=c(0.16,0.84)), x.lab = "Effect: mean difference" ) title( "95% posterior intervals of studies' effects") caterplot(bcmix.2.stemcell.mcmc, parms = theta.b.names, # theta.bias labels = theta.greek.names, greek = T, labels.loc="no", cex = 0.7, col = "grey", style = "plain", reorder = F, val.lim =c(-6, 16), quantiles = list(outer=c(0.025,0.975),inner=c(0.16,0.84)), add = TRUE, collapse=TRUE, cat.shift= -0.5, ) attach.jags(bcmix.2.stemcell, overwrite = TRUE) abline(v=mean(mu.theta), lwd =2, lty =2) legend(9, 20, legend = c("bias corrected", "biased"), lty = c(1,1), lwd = c(2,2), col = c("black", "grey")) ## End(Not run)## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect # Beta(0.5, 1) a.0 = 0.5 a.1 = 1 # alpha.max N = dim(stemcells)[1] alpha.max = 1/5 *((N-1)*a.0 - a.1)/(a.0 + a.1) alpha.max # K.max K.max = 1 + 5*alpha.max K.max = round(K.max) K.max set.seed(20233) bcmix.2.stemcell = bcmixmeta(stemcells, mean.mu.theta=0, sd.mu.theta=100, B.lower = -15, B.upper = 15, alpha.0 = 0.5, alpha.1 = alpha.max, a.0 = a.0, a.1 = a.1, K = K.max, df.scale.between = 1, scale.sigma.between = 0.5, nr.chains = 4, nr.iterations = 50000, nr.adapt = 1000, nr.burnin = 10000, nr.thin = 4) diagnostic(bcmix.2.stemcell, y.lim = c(-1, 15), title.plot = "Default priors") bcmix.2.stemcell.mcmc <- as.mcmc(bcmix.1.stemcell$BUGSoutput$sims.matrix) theta.names <- paste(paste("theta[",1:31, sep=""),"]", sep="") theta.b.names <- paste(paste("theta.bias[",1:31, sep=""),"]", sep="") theta.b.greek.names <- paste(paste("theta[",1:31, sep=""),"]^B", sep="") theta.greek.names <- paste(paste("theta[",1:31, sep=""),"]", sep="") caterplot(bcmix.2.stemcell.mcmc, parms = theta.names, # theta labels = theta.greek.names, greek = T, labels.loc="axis", cex =0.7, col = "black", style = "plain", reorder = F, val.lim =c(-6, 16), quantiles = list(outer=c(0.05,0.95),inner=c(0.16,0.84)), x.lab = "Effect: mean difference" ) title( "95% posterior intervals of studies' effects") caterplot(bcmix.2.stemcell.mcmc, parms = theta.b.names, # theta.bias labels = theta.greek.names, greek = T, labels.loc="no", cex = 0.7, col = "grey", style = "plain", reorder = F, val.lim =c(-6, 16), quantiles = list(outer=c(0.025,0.975),inner=c(0.16,0.84)), add = TRUE, collapse=TRUE, cat.shift= -0.5, ) attach.jags(bcmix.2.stemcell, overwrite = TRUE) abline(v=mean(mu.theta), lwd =2, lty =2) legend(9, 20, legend = c("bias corrected", "biased"), lty = c(1,1), lwd = c(2,2), col = c("black", "grey")) ## End(Not run)
This function performers a Bayesian meta-analysis
bmeta( data, mean.mu = 0, sd.mu = 10, scale.sigma.between = 0.5, df.scale.between = 1, df = 4, df.estimate = FALSE, df.lower = 3, df.upper = 30, re = "normal", nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, be.quiet = FALSE, parallel = NULL )bmeta( data, mean.mu = 0, sd.mu = 10, scale.sigma.between = 0.5, df.scale.between = 1, df = 4, df.estimate = FALSE, df.lower = 3, df.upper = 30, re = "normal", nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, be.quiet = FALSE, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
mean.mu |
Prior mean of the overall mean parameter mu, default value is 0. |
sd.mu |
Prior standard deviation of mu, the default value is 10. |
scale.sigma.between |
Prior scale parameter for scale gamma distribution for the precision between studies. The default value is 0.5. |
df.scale.between |
Degrees of freedom of the scale gamma distribution for the precision between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
df |
Default value df = 4. When re = "sm", this parameter corresponds to the degrees of freedom of the implied Student-t random effects distribution arising from the scale mixture of normal distributions. |
df.estimate |
Logical value indicating whether the degrees of freedom parameter
of the scale mixture distribution should be estimated. If FALSE
the value specified in |
df.lower |
Lower bound of the prior distribution for the degrees of freedom
when |
df.upper |
Upper bound of the prior distribution for the degrees of freedom
when |
re |
Random effects distribution. Possible values are "normal" for Normal random effects and "sm" for scale mixtures of Normals (robust heavy-tailed model). |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
be.quiet |
Do not print warning message if the model does not adapt. The default value is FALSE. If you are not sure about the adaptation period choose be.quiet=TRUE. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcmeta can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "bmeta". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E. (2021) A Bias-Corrected Meta-Analysis Model for Combining Studies of Different Types and Quality. Biometrical Journal; 1–17.
Generates a heatmap with hierarchical clustering applied to rows and columns. It reorders the input matrix based on clustering results and visualizes the data.
cocluster_plot( data, labels.row = NULL, labels.col = NULL, colors = "Blues", breaks = NULL, title = "Clustered Heatmap", border.color = "black", cell.ratio = 1, cluster.rows = TRUE, cluster.cols = TRUE, clustering.distance.rows = "euclidean", clustering.distance.cols = "euclidean", row.clustering.method = "complete", col.clustering.method = "complete", show.row.names = TRUE, show.col.names = TRUE, fontsize = 8, fontsize.row = NULL, fontsize.col = NULL, display.numbers = FALSE, round.digits = 2, numbers.color = "black", numbers.fontsize = 0.5, label.color = "black", col.name.angle = 45, legend = TRUE, legend.labels = NULL, show.legend.labels = TRUE, ... )cocluster_plot( data, labels.row = NULL, labels.col = NULL, colors = "Blues", breaks = NULL, title = "Clustered Heatmap", border.color = "black", cell.ratio = 1, cluster.rows = TRUE, cluster.cols = TRUE, clustering.distance.rows = "euclidean", clustering.distance.cols = "euclidean", row.clustering.method = "complete", col.clustering.method = "complete", show.row.names = TRUE, show.col.names = TRUE, fontsize = 8, fontsize.row = NULL, fontsize.col = NULL, display.numbers = FALSE, round.digits = 2, numbers.color = "black", numbers.fontsize = 0.5, label.color = "black", col.name.angle = 45, legend = TRUE, legend.labels = NULL, show.legend.labels = TRUE, ... )
data |
A numeric matrix for the heatmap. |
labels.row |
An optional character vector of new labels for the rows. |
labels.col |
An optional character vector of new labels for the columns. |
colors |
A character string specifying one of the predefined palettes or a custom vector of colors. Predefined options include:
Defaults to "Blues". |
breaks |
The number of color breaks to use for the palette. Defaults to 'NULL'. |
title |
Plot title. Default: "Clustered Heatmap". |
border.color |
Color of cell borders on the heatmap. Use "NA" for no border. Default: "white". |
cell.ratio |
A numeric value defining the cell's height-to-width ratio. A value of 1 creates square cells. A value > 1 creates vertical rectangles, while a value < 1 creates horizontal rectangles. Default is 1. |
cluster.rows |
A logical value indicating whether to cluster rows. Default: 'TRUE'. |
cluster.cols |
A logical value indicating whether to cluster columns. Default: 'TRUE'. |
clustering.distance.rows |
Distance measure for row clustering. Can be a string ("euclidean", "correlation", etc.) or a pre-calculated distance object. Default: "euclidean". |
clustering.distance.cols |
Distance measure for column clustering. Can be a string ("euclidean", "correlation", etc.) or a pre-calculated distance object. Default: "euclidean". |
row.clustering.method |
Agglomeration method for row clustering (see '?hclust'). Default: "complete". |
col.clustering.method |
Agglomeration method for column clustering (see '?hclust'). Default: "complete". |
show.row.names |
Logical, display row names. Default: TRUE. |
show.col.names |
Logical, display column names. Default: TRUE. |
fontsize |
Base font size for the plot. Default: 8. |
fontsize.row |
Font size for row names. If 'NULL', defaults to 'fontsize'. |
fontsize.col |
Font size for column names. If 'NULL', defaults to 'fontsize'. |
display.numbers |
Logical determining if the numeric values are also printed to the cells. |
round.digits |
Numeric value. For 'display.numbers = TRUE', this sets the decimal places for all values. Default: 2. |
numbers.color |
Color of the numbers. Default: "black". |
numbers.fontsize |
Font size of the numbers. Default: 'fontsize'. |
label.color |
Color of the row and column labels. Default: "black". |
col.name.angle |
Angle for column names. Default: 45. |
legend |
A logical value indicating whether to show the color legend. Default: 'TRUE'. |
legend.labels |
A character vector of custom labels for the legend. |
show.legend.labels |
Logical, display legend labels. Default: TRUE. |
... |
... |
A 'ggplot2' object.
Meta-analysis of 7 RCTs, 4 cRWE studies, and 2 matched sRWE studies evaluating progression-free survival (PFS) as a surrogate endpoint to overall survival (OS) in metastatic colorectal cancer (mCRC), comparing antiangiogenic treatments with chemotherapy.
A dataframe with 13 rows and 6 columns. Each row represents study results, the columns are:
Author and year.
randomized clinical trial or comparative/single-arm real-world-evidence
logarithm of hazard ratios of progression-free survival
standard error of pfs
logarithm of hazard ratios of overall survival
standard error of os
Wheaton L, Papanikos A, Thomas A, Bujkiewicz S. Using Bayesian Evidence Synthesis Methods to Incorporate Real-World Evidence in Surrogate Endpoint Evaluation. Medical Decision Making. 2023;43(5):539-552. doi:10.1177/0272989X231162852
Meta-analysis of 35 Observational Studies from PubMed, Cocharane Library and SciELO databases that assessed the impact of diabetes, hypertension, cardiovascular disease, and the use of ACEI/ARB on severity and mortality of COVID-19 cases.
A dataframe with 89 rows and 12 columns. Each row represents study results, the columns are:
Principal author and year of publication.
Endoint: severity or mortality.
Possible risk factors: diabetes, hypertension, cardiovascular, ACE_ARB.
Number of events in the group with risk factor.
Number of patients in the group with risk factor.
Number of events in the group without risk factor.
Number of patients in the group with risk factor.
Study design: Case Series, Cross Sectional and Retrospective Cohort.
Log Odds Ratio
Standard Error of the Log Odds Ratio
Logit transformation of the proportion of events in the control group.
Total number of patients.
de Almeida-Pititto, B., Dualib, P.M., Zajdenverg, L. et al. Severity and mortality of COVID 19 in patients with diabetes, hypertension and cardiovascular disease: a meta-analysis. Diabetol Metab Syndr 12, 75 (2020). https://doi.org/10.1186/s13098-020-00586-4
A dataset containing detailed measurements from a study investigating the relationship between diabetes and eye health. The dataset includes patient demographics, visual acuity, and extensive macular metrics derived from optical coherence tomography (OCT) imaging.
A dataframe with 270 columns and 97 rows, where each row represents a patient. The columns include:
Patient ID.
Indicator for diabetes (2 = diabetic (type 2), 0 = healthy).
Gender of the patient (1 = Male, 2 = Female).
Age of the patient (years).
Smoking status (1 = Smoker, 0 = Non-smoker).
Weight of the patient (kg).
Height of the patient (m).
Body Mass Index
Visual acuity for the right eye.
Visual acuity for the left eye.
Measure of contrast sensitivity for the left eye.
Measure of contrast sensitivity for the left eye.
Measurement of the right eye, Papilla, Retinal Nerve Fiber Layer, Nasal Parafovea
Measurement of the right eye, Papilla, Retinal Nerve Fiber Layer, Nasal Inferior Parafovea
Measurement of the right eye, Papilla, Retinal Nerve Fiber Layer, Temporal Inferior Parafovea
Measurement of the right eye, Papilla, Retinal Nerve Fiber Layer, Temporal Parafovea
Measurement of the right eye, Papilla, Retinal Nerve Fiber Layer, Temporal Superior Parafovea
Measurement of the right eye, Papilla, Retinal Nerve Fiber Layer, Global Layer
Measurement of the left eye, Papilla, Retinal Nerve Fiber Layer, Nasal Superior Parafovea
Measurement of the left eye, Papilla, Retinal Nerve Fiber Layer, Nasal Parafovea
Measurement of the left eye, Papilla, Retinal Nerve Fiber Layer, Nasal Inferior Parafovea
Measurement of the left eye, Papilla, Retinal Nerve Fiber Layer, Temporal Inferior Parafovea
Measurement of the left eye, Papilla, Retinal Nerve Fiber Layer, Temporal Parafovea
Measurement of the left eye, Papilla, Retinal Nerve Fiber Layer, Temporal Superior Parafovea
Measurement of the left eye, Papilla, Retinal Nerve Fiber Layer, Global Layer
Measurement of the right eye, Papilla, Complete Retinal Thickness, Nasal Superior Parafovea
Measurement of the right eye, Papilla, Complete Retinal Thickness, Nasal Parafovea
Measurement of the right eye, Papilla, Complete Retinal Thickness, Nasal Inferior Parafovea
Measurement of the right eye, Papilla, Complete Retinal Thickness, Temporal Inferior Parafovea
Measurement of the right eye, Papilla, Complete Retinal Thickness, Temporal Parafovea
Measurement of the right eye, Papilla, Complete Retinal Thickness, Temporal Superior Parafovea
Measurement of the right eye, Papilla, Complete Retinal Thickness, Global Layer
Measurement of the left eye, Papilla, Complete Retinal Thickness, Nasal Superior Parafovea
Measurement of the left eye, Papilla, Complete Retinal Thickness, Nasal Parafovea
Measurement of the left eye, Papilla, Complete Retinal Thickness, Nasal Inferior Parafovea
Measurement of the left eye, Papilla, Complete Retinal Thickness, Temporal Inferior Parafovea
Measurement of the left eye, Papilla, Complete Retinal Thickness, Temporal Parafovea
Measurement of the left eye, Papilla, Complete Retinal Thickness, Temporal Superior Parafovea
Measurement of the left eye, Papilla, Complete Retinal Thickness, Global Layer
Measurement of the right eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Nasal Superior Parafovea
Measurement of the right eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Nasal Parafovea
Measurement of the right eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Nasal Inferior Parafovea
Measurement of the right eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Temporal Inferior Parafovea
Measurement of the right eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Temporal Parafovea
Measurement of the right eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Temporal Superior Parafovea
Measurement of the right eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Global Layer
Measurement of the left eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Nasal Superior Parafovea
Measurement of the left eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Nasal Parafovea
Measurement of the left eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Nasal Inferior Parafovea
Measurement of the left eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Temporal Inferior Parafovea
Measurement of the left eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Temporal Parafovea
Measurement of the left eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Temporal Superior Parafovea
Measurement of the left eye, Papilla, Ganglion Cell Layer and Inner Plexiform Layer combined, Global Layer
Measurement of the right eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Nasal Superior Parafovea
Measurement of the right eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Nasal Parafovea
Measurement of the right eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Nasal Inferior Parafovea
Measurement of the right eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Temporal Inferior Parafovea
Measurement of the right eye, Inner Nuclear Layer and Outer Plexiform Layer combined, Temporal Parafovea
Measurement of the right eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Temporal Superior Parafovea
Measurement of the right eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Global Layer
Measurement of the left eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Nasal Superior Parafovea
Measurement of the left eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Nasal Parafovea
Measurement of the left eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Nasal Inferior Parafovea
Measurement of the left eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Temporal Inferior Parafovea
Measurement of the left eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Temporal Parafovea
Measurement of the left eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Temporal Superior Parafovea
Measurement of the left eye, Papilla, Inner Nuclear Layer and Outer Plexiform Layer combined, Global Layer
Measurement of the right eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Nasal Superior Parafovea
Measurement of the right eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Nasal Parafovea
Measurement of the right eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Nasal Inferior Parafovea
Measurement of the right eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Temporal Inferior Parafovea
Measurement of the right eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Temporal Parafovea
Measurement of the right eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Temporal Superior Parafovea
Measurement of the right eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Global Layer
Measurement of the left eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Nasal Superior Parafovea
Measurement of the left eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Nasal Parafovea
Measurement of the left eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Nasal Inferior Parafovea
Measurement of the left eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Temporal Inferior Parafovea
Measurement of the left eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Temporal Parafovea
Measurement of the left eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Temporal Superior Parafovea
Measurement of the left eye, Papilla, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Global Layer
Measurement of the right eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Nasal Superior Parafovea
Measurement of the right eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Nasal Parafovea
Measurement of the right eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Nasal Inferior Parafovea
Measurement of the right eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Temporal Inferior Parafovea
Measurement of the right eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Temporal Parafovea
Measurement of the right eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Temporal Superior Parafovea
Measurement of the right eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Global Layer
Measurement of the left eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Nasal Superior Parafovea
Measurement of the left eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Nasal Parafovea
Measurement of the left eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Nasal Inferior Parafovea
Measurement of the left eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Temporal Inferior Parafovea
Measurement of the left eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Temporal Parafovea
Measurement of the left eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Temporal Superior Parafovea
Measurement of the left eye, Papilla, Photoreceptor Fiber Layer and Basal Membrane combined, Global Layer
Manual measurement of the right eye, Macula, Complete Retinal Thickness, Nasal Outer Parafovea
Manual measurement of the right eye, Macula, Ganglion Cell Layer and Inner Plexiform Layer combined, Nasal Outer Parafovea
Manual measurement of the right eye, Macula, Inner Nuclear Layer and Outer Plexiform Layer combined, Nasal Outer Parafovea
Manual measurement of the right eye, Macula, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Nasal Outer Parafovea
Manual measurement of the right eye, Macula, Photoreceptor Fiber Layer and Basal Membrane combined, Nasal Outer Parafovea
Manual measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Nasal Outer Parafovea
Manual measurement of the left eye, Macula, Complete Retinal Thickness, Nasal Outer Parafovea
Manual measurement of the left eye, Macula, Ganglion Cell Layer and Inner Plexiform Layer combined, Nasal Outer Parafovea
Manual measurement of the left eye, Macula, Inner Nuclear Layer and Outer Plexiform Layer combined, Nasal Outer Parafovea
Manual measurement of the left eye, Macula, Outer Nuclear Layer and Photoreceptor Inner Segment Layer combined, Nasal Outer Parafovea
Manual measurement of the left eye, Macula, Photoreceptor Fiber Layer and Basal Membrane combined, Nasal Outer Parafovea
Manual measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Nasal Outer Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Superior Inner Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Superior Outer Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Nasal Inner Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Nasal Outer Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Inferior Inner Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Inferior Outer Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Temporal Inner Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Temporal Outer Parafovea
Measurement of the right eye, Macula, Complete Retinal Thickness, Center Fovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Superior Inner Parafovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Superior Outer Parafovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Nasal Inner Parafovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Nasal Outer Parafovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Inferior Inner Parafovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Inferior Outer Parafovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Temporal Inner Parafovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Temporal Outer Parafovea
Measurement of the right eye, Macula, Retinal Nerve Fiber Layer, Center Fovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Superior Inner Parafovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Superior Outer Parafovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Nasal Inner Parafovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Nasal Outer Parafovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Inferior Inner Parafovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Inferior Outer Parafovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Temporal Inner Parafovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Temporal Outer Parafovea
Measurement of the right eye, Macula, Ganglion Cell Layer, Center Fovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Superior Inner Parafovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Superior Outer Parafovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Nasal Inner Parafovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Nasal Outer Parafovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Inferior Inner Parafovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Inferior Outer Parafovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Temporal Inner Parafovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Temporal Outer Parafovea
Measurement of the right eye, Macula, Inner Plexiform Layer, Center Fovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Superior Inner Parafovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Superior Outer Parafovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Nasal Inner Parafovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Nasal Outer Parafovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Inferior Inner Parafovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Inferior Outer Parafovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Temporal Inner Parafovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Temporal Outer Parafovea
Measurement of the right eye, Macula, Inner Nuclear Layer, Center Fovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Superior Inner Parafovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Superior Outer Parafovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Nasal Inner Parafovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Nasal Outer Parafovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Inferior Inner Parafovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Inferior Outer Parafovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Temporal Inner Parafovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Temporal Outer Parafovea
Measurement of the right eye, Macula, Outer Plexiform Layer, Center Fovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Superior Inner Parafovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Superior Outer Parafovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Nasal Inner Parafovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Nasal Outer Parafovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Inferior Inner Parafovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Inferior Outer Parafovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Temporal Inner Parafovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Temporal Outer Parafovea
Measurement of the right eye, Macula, Outer Nuclear Layer, Center Fovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Superior Inner Parafovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Superior Outer Parafovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Nasal Inner Parafovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Nasal Outer Parafovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Inferior Inner Parafovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Inferior Outer Parafovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Temporal Inner Parafovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Temporal Outer Parafovea
Measurement of the right eye, Macula, Retinal Pigment Epithelium, Center Fovea
Measurement of the right eye, Macula, Unknown Layer, Superior Inner Parafovea
Measurement of the right eye, Macula, Unknown Layer, Superior Outer Parafovea
Measurement of the right eye, Macula, Unknown Layer, Nasal Inner Parafovea
Measurement of the right eye, Macula, Unknown Layer, Nasal Outer Parafovea
Measurement of the right eye, Macula, Unknown Layer, Inferior Inner Parafovea
Measurement of the right eye, Macula, Unknown Layer, Inferior Outer Parafovea
Measurement of the right eye, Macula, Unknown Layer, Temporal Inner Parafovea
Measurement of the right eye, Macula, Unknown Layer, Temporal Outer Parafovea
Measurement of the right eye, Macula, Unknown Layer, Center Fovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Superior Inner Parafovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Superior Outer Parafovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Nasal Inner Parafovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Nasal Outer Parafovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Inferior Inner Parafovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Inferior Outer Parafovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Temporal Inner Parafovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Temporal Outer Parafovea
Measurement of the left eye, Macula, Complete Retinal Thickness, Center Fovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Superior Inner Parafovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Superior Outer Parafovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Nasal Inner Parafovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Nasal Outer Parafovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Inferior Inner Parafovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Inferior Outer Parafovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Temporal Inner Parafovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Temporal Outer Parafovea
Measurement of the left eye, Macula, Retinal Nerve Fiber Layer, Center Fovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Superior Inner Parafovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Superior Outer Parafovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Nasal Inner Parafovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Nasal Outer Parafovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Inferior Inner Parafovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Inferior Outer Parafovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Temporal Inner Parafovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Temporal Outer Parafovea
Measurement of the left eye, Macula, Ganglion Cell Layer, Center Fovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Superior Inner Parafovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Superior Outer Parafovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Nasal Inner Parafovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Nasal Outer Parafovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Inferior Inner Parafovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Inferior Outer Parafovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Temporal Inner Parafovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Temporal Outer Parafovea
Measurement of the left eye, Macula, Inner Plexiform Layer, Center Fovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Superior Inner Parafovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Superior Outer Parafovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Nasal Inner Parafovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Nasal Outer Parafovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Inferior Inner Parafovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Inferior Outer Parafovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Temporal Inner Parafovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Temporal Outer Parafovea
Measurement of the left eye, Macula, Inner Nuclear Layer, Center Fovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Superior Inner Parafovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Superior Outer Parafovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Nasal Inner Parafovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Nasal Outer Parafovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Inferior Inner Parafovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Inferior Outer Parafovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Temporal Inner Parafovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Temporal Outer Parafovea
Measurement of the left eye, Macula, Outer Plexiform Layer, Center Fovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Superior Inner Parafovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Superior Outer Parafovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Nasal Inner Parafovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Nasal Outer Parafovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Inferior Inner Parafovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Inferior Outer Parafovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Temporal Inner Parafovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Temporal Outer Parafovea
Measurement of the left eye, Macula, Outer Nuclear Layer, Center Fovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Superior Inner Parafovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Superior Outer Parafovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Nasal Inner Parafovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Nasal Outer Parafovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Inferior Inner Parafovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Inferior Outer Parafovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Temporal Inner Parafovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Temporal Outer Parafovea
Measurement of the left eye, Macula, Retinal Pigment Epithelium, Center Fovea
Measurement of the left eye, Macula, Unknown Layer, Superior Inner Parafovea
Measurement of the left eye, Macula, Unknown Layer, Superior Outer Parafovea
Measurement of the left eye, Macula, Unknown Layer, Nasal Inner Parafovea
Measurement of the left eye, Macula, Unknown Layer, Nasal Outer Parafovea
Measurement of the left eye, Macula, Unknown Layer, Inferior Inner Parafovea
Measurement of the left eye, Macula, Unknown Layer, Inferior Outer Parafovea
Measurement of the left eye, Macula, Unknown Layer, Temporal Inner Parafovea
Measurement of the left eye, Macula, Unknown Layer, Temporal Outer Parafovea
Measurement of the left eye, Macula, Unknown Layer, Center Fovea
Layer abbreviations include RNFL (Retinal Nerve Fiber Layer), GCL (Ganglion Cell Layer), IPL (Inner Plexiform Layer), INL (Inner Nuclear Layer), OPL (Outer Plexiform Layer), ONL (Outer Nuclear Layer), RPE (Retinal Pigment Epithelium), and IRL (Inner Retinal Layer).
Steingrube, N. (2023). Analysis of early changes in the retina and their association with diabetic alterations of the corneal nerve fiber plexus in type 2 diabetes mellitus. Unpublished doctoral dissertation. Faculty of Medicine, Heinrich-Heine University Dusseldorf.
Department of Ophthalmology, University Hospital Dusseldorf, Heinrich Heine University, Germany
Generic diagnostic function.
diagnostic(object, ...)diagnostic(object, ...)
object |
The object generated by the function hmr. |
... |
... |
This function performers an approximated Bayesian cross-validation for a b3lmeta object
## S3 method for class 'b3lmeta' diagnostic( object, post.p.value.cut = 0.05, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, ... )## S3 method for class 'b3lmeta' diagnostic( object, post.p.value.cut = 0.05, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, ... )
object |
The object generated by the function b3lmeta. |
post.p.value.cut |
Posterior p-value cut point to assess outliers. |
study.names |
Character vector containing names of the studies used. |
size.forest |
Size of the center symbol mark in the forest-plot lines |
lwd.forest |
Thickness of the lines in the forest-plot |
shape.forest |
Type of symbol for the center mark in the forest-plot lines |
... |
... |
This function performers an approximated Bayesian cross-validation for a bcmeta object and specially designed diagnostics to detect the existence of a biased component.
## S3 method for class 'bcdpmeta' diagnostic( object, post.p.value.cut = 0.05, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, bias.plot = TRUE, cross.val.plot = FALSE, level = c(0.5, 0.75, 0.95), x.lim = c(0, 1), y.lim = c(0, 10), x.lab = "P(Bias)", y.lab = "Mean Bias", title.plot = paste("Bias Diagnostics Contours (50%, 75% and 95%)"), kde2d.n = 25, marginals = TRUE, bin.hist = 30, color.line = "black", color.hist = "white", color.data.points = "black", alpha.data.points = 0.1, S = 5000, ... )## S3 method for class 'bcdpmeta' diagnostic( object, post.p.value.cut = 0.05, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, bias.plot = TRUE, cross.val.plot = FALSE, level = c(0.5, 0.75, 0.95), x.lim = c(0, 1), y.lim = c(0, 10), x.lab = "P(Bias)", y.lab = "Mean Bias", title.plot = paste("Bias Diagnostics Contours (50%, 75% and 95%)"), kde2d.n = 25, marginals = TRUE, bin.hist = 30, color.line = "black", color.hist = "white", color.data.points = "black", alpha.data.points = 0.1, S = 5000, ... )
object |
The object generated by the function b3lmeta. |
post.p.value.cut |
Posterior p-value cut point to assess outliers. |
study.names |
Character vector containing names of the studies used. |
size.forest |
Size of the center symbol mark in the forest-plot lines |
lwd.forest |
Thickness of the lines in the forest-plot |
shape.forest |
Type of symbol for the center mark in the forest-plot lines |
bias.plot |
Display the bias plot. The default is TRUE. |
cross.val.plot |
Display the cross validation plot. The default is FALSE. |
level |
Vector with the probability levels of the contour plot. The default values are: 0.5, 0.75, and 0.95. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the bias plot. |
kde2d.n |
The number of grid points in each direction for the non-parametric density estimation. The default is 25. |
marginals |
If TRUE the marginal histograms of the posteriors are added to the plot. |
bin.hist |
The number of bins in for the histograms. The default value is 30. |
color.line |
The color of the contour lines. The default is "black. |
color.hist |
The color of the histogram bars. The default is "white". |
color.data.points |
The color of the data points. The default is "black". |
alpha.data.points |
Transparency of the data points. |
S |
The number of sample values from the joint posterior distribution used to approximate the contours. The default is S=5000. |
... |
... |
This function performers an approximated Bayesian cross-validation for a bcmeta object and specially designed diagnostics to detect the existence of a biased component.
## S3 method for class 'bcmeta' diagnostic( object, post.p.value.cut = 0.05, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, bias.plot = TRUE, level = c(0.5, 0.75, 0.95), x.lim = c(0, 1), y.lim = c(0, 10), x.lab = expression(pi^{ B }), y.lab = expression(mu[beta]), title.plot = paste("Bias Diagnostics Contours (50%, 75% and 95%)"), kde2d.n = 25, marginals = TRUE, bin.hist = 30, color.line = "black", color.hist = "white", color.data.points = "black", alpha.data.points = 0.1, S = 5000, ... )## S3 method for class 'bcmeta' diagnostic( object, post.p.value.cut = 0.05, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, bias.plot = TRUE, level = c(0.5, 0.75, 0.95), x.lim = c(0, 1), y.lim = c(0, 10), x.lab = expression(pi^{ B }), y.lab = expression(mu[beta]), title.plot = paste("Bias Diagnostics Contours (50%, 75% and 95%)"), kde2d.n = 25, marginals = TRUE, bin.hist = 30, color.line = "black", color.hist = "white", color.data.points = "black", alpha.data.points = 0.1, S = 5000, ... )
object |
The object generated by the function b3lmeta. |
post.p.value.cut |
Posterior p-value cut point to assess outliers. |
study.names |
Character vector containing names of the studies used. |
size.forest |
Size of the center symbol mark in the forest-plot lines |
lwd.forest |
Thickness of the lines in the forest-plot |
shape.forest |
Type of symbol for the center mark in the forest-plot lines |
bias.plot |
Display the bias plot. The default is TRUE. |
level |
Vector with the probability levels of the contour plot. The default values are: 0.5, 0.75, and 0.95. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the bias plot. |
kde2d.n |
The number of grid points in each direction for the non-parametric density estimation. The default is 25. |
marginals |
If TRUE the marginal histograms of the posteriors are added to the plot. |
bin.hist |
The number of bins in for the histograms. The default value is 30. |
color.line |
The color of the contour lines. The default is "black. |
color.hist |
The color of the histogram bars. The default is "white". |
color.data.points |
The color of the data points. The default is "black". |
alpha.data.points |
Transparency of the data points. |
S |
The number of sample values from the joint posterior distribution used to approximate the contours. The default is S=5000. |
... |
... |
This function performers an approximated Bayesian cross-validation for a bcmeta object and specially designed diagnostics to detect the existence of a biased component.
## S3 method for class 'bcmixmeta' diagnostic( object, post.p.value.cut = 0.05, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, bias.plot = TRUE, cross.val.plot = FALSE, level = c(0.5, 0.75, 0.95), cut.point = 0, x.lim = c(0, 1), y.lim = c(0, 10), x.lab = "P(Bias|Data)", y.lab = expression(beta^new), title.plot = paste("Bias Diagnostics Contours (50%, 75% and 95%)"), kde2d.n = 25, marginals = TRUE, bin.hist = 30, color.line = "black", color.hist = "white", color.data.points = "black", alpha.data.points = 0.1, S = 5000, ... )## S3 method for class 'bcmixmeta' diagnostic( object, post.p.value.cut = 0.05, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, bias.plot = TRUE, cross.val.plot = FALSE, level = c(0.5, 0.75, 0.95), cut.point = 0, x.lim = c(0, 1), y.lim = c(0, 10), x.lab = "P(Bias|Data)", y.lab = expression(beta^new), title.plot = paste("Bias Diagnostics Contours (50%, 75% and 95%)"), kde2d.n = 25, marginals = TRUE, bin.hist = 30, color.line = "black", color.hist = "white", color.data.points = "black", alpha.data.points = 0.1, S = 5000, ... )
object |
The object generated by the function b3lmeta. |
post.p.value.cut |
Posterior p-value cut point to assess outliers. |
study.names |
Character vector containing names of the studies used. |
size.forest |
Size of the center symbol mark in the forest-plot lines |
lwd.forest |
Thickness of the lines in the forest-plot |
shape.forest |
Type of symbol for the center mark in the forest-plot lines |
bias.plot |
Display the bias plot. The default is TRUE. |
cross.val.plot |
Display the cross validation plot. The default is FALSE. |
level |
Vector with the probability levels of the contour plot. The default values are: 0.5, 0.75, and 0.95. |
cut.point |
This is a reference point for the bias distribution. The default value is cut.point = 0 to understand if we can learn bias from the data |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the bias plot. |
kde2d.n |
The number of grid points in each direction for the non-parametric density estimation. The default is 25. |
marginals |
If TRUE the marginal histograms of the posteriors are added to the plot. |
bin.hist |
The number of bins in for the histograms. The default value is 30. |
color.line |
The color of the contour lines. The default is "black. |
color.hist |
The color of the histogram bars. The default is "white". |
color.data.points |
The color of the data points. The default is "black". |
alpha.data.points |
Transparency of the data points. |
S |
The number of sample values from the joint posterior distribution used to approximate the contours. The default is S=5000. |
... |
... |
This function performers an approximated Bayesian cross-validation for a b3lmeta object
## S3 method for class 'bmeta' diagnostic( object, post.p.value.cut = 0.05, median.w = 1.5, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, ... )## S3 method for class 'bmeta' diagnostic( object, post.p.value.cut = 0.05, median.w = 1.5, study.names = NULL, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, ... )
object |
The object generated by the function bmeta. |
post.p.value.cut |
Posterior p-value cut point to assess outliers. |
median.w |
Change color if median of a weight > median.w. The default value is 1.5. |
study.names |
Character vector containing names of the studies used. |
size.forest |
Size of the center symbol mark in the forest-plot lines |
lwd.forest |
Thickness of the lines in the forest-plot |
shape.forest |
Type of symbol for the center mark in the forest-plot lines |
... |
... |
This function performers a specially designed diagnostic for a hmr object
## S3 method for class 'hmr' diagnostic( object, median.w = 1.5, study.names, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, mu.phi = TRUE, mu.phi.x.lim.low = -10, mu.phi.x.lim.up = 10, colour.hist.mu.phi = "royalblue", colour.prior.mu.phi = "black", colour.posterior.mu.phi = "blue", title.plot.mu.phi = "Prior-to-Posterior Sensitivity", title.plot.weights = "Outlier Detection", ... )## S3 method for class 'hmr' diagnostic( object, median.w = 1.5, study.names, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, mu.phi = TRUE, mu.phi.x.lim.low = -10, mu.phi.x.lim.up = 10, colour.hist.mu.phi = "royalblue", colour.prior.mu.phi = "black", colour.posterior.mu.phi = "blue", title.plot.mu.phi = "Prior-to-Posterior Sensitivity", title.plot.weights = "Outlier Detection", ... )
object |
The object generated by the function hmr. |
median.w |
Change colour if median of a weight > median.w. The default value is 1.5. |
study.names |
Character vector containing names of the studies used. |
size.forest |
Size of the center symbol mark in the forest-plot lines |
lwd.forest |
Thickness of the lines in the forest-plot |
shape.forest |
Type of symbol for the center mark in the forest-plot lines |
mu.phi |
Prior-to-posterior sensitivity analysis of mu.phi. Default value is TRUE. |
mu.phi.x.lim.low |
Lower limit of the prior to posterior plot for mu.phi |
mu.phi.x.lim.up |
Upper limit of the prior to posterior plot for mu.phi |
colour.hist.mu.phi |
colour of the posterior mu.phi histogram |
colour.prior.mu.phi |
colour of the prior of mu.phi |
colour.posterior.mu.phi |
colour of the posterior of mu.phi |
title.plot.mu.phi |
Text for the title in the mu phi plot. |
title.plot.weights |
Text for the title of the posterior weights. |
... |
... |
This function performers a specially designed diagnostic for a metarisk object
## S3 method for class 'metarisk' diagnostic( object, median.w = 1.5, study.names, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, ... )## S3 method for class 'metarisk' diagnostic( object, median.w = 1.5, study.names, size.forest = 0.4, lwd.forest = 0.2, shape.forest = 23, ... )
object |
The object generated by the function hmr. |
median.w |
Change color if median of a weight > median.w. The default value is 1.5. |
study.names |
Character vector containing names of the studies used. |
size.forest |
Size of the center symbol mark in the forest-plot lines |
lwd.forest |
Thickness of the lines in the forest-plot |
shape.forest |
Type of symbol for the center mark in the forest-plot lines |
... |
... |
This function performers a Bayesian meta-analysis with DP as random effects
dpmeta( data, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, alpha.0 = 0.03, alpha.1 = 10, K = 30, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )dpmeta( data, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, alpha.0 = 0.03, alpha.1 = 10, K = 30, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
mean.mu.0 |
Prior mean of the mean of the base distribution default value is mean.mu.0 = 0. |
sd.mu.0 |
Prior standard deviation of the base distribution, the default value is 10. |
scale.sigma.between |
Prior scale parameter for scale gamma distribution for the precision between studies. The default value is 0.5. |
df.scale.between |
Degrees of freedom of the scale gamma distribution for the precision between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
alpha.0 |
Lower bound of the uniform prior for the concentration parameter for the DPM, default value is alpha.0 = 0.03. |
alpha.1 |
Upper bound of the uniform prior for the concentration parameter for the DPM, default value is alpha.1 = 10. |
K |
Maximum number of clusters in the DP, default value is K = 30. |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1 |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcmeta can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "dpmeta". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E. (2021) A Bias-Corrected Meta-Analysis Model for Combining Studies of Different Types and Quality. Biometrical Journal; 1–17.
## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect bm1 = dpmmeta(stemcells) summary(bm1) plot(bm1, x.lim = c(-1, 7), y.lim = c(0, 1)) diagnostic(bm1, study.names = stemcells$trial, post.p.value.cut = 0.05, lwd.forest = 0.5, shape.forest = 4) diagnostic(bm1, post.p.value.cut = 0.05, lwd.forest = 0.5, shape.forest = 4) ## End(Not run)## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect bm1 = dpmmeta(stemcells) summary(bm1) plot(bm1, x.lim = c(-1, 7), y.lim = c(0, 1)) diagnostic(bm1, study.names = stemcells$trial, post.p.value.cut = 0.05, lwd.forest = 0.5, shape.forest = 4) diagnostic(bm1, post.p.value.cut = 0.05, lwd.forest = 0.5, shape.forest = 4) ## End(Not run)
This function performers a Bayesian meta-analysis with DP as random effects
dpmetareg( data, x, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, alpha.0 = 0.03, alpha.1 = 10, K = 30, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )dpmetareg( data, x, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, alpha.0 = 0.03, alpha.1 = 10, K = 30, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
x |
a covariate to perform meta-regression. |
mean.mu.0 |
Prior mean of the mean of the base distribution default value is mean.mu.0 = 0. |
sd.mu.0 |
Prior standard deviation of the base distribution, the default value is 10. |
scale.sigma.between |
Prior scale parameter for scale gamma distribution for the precision between studies. The default value is 0.5. |
df.scale.between |
Degrees of freedom of the scale gamma distribution for the precision between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
alpha.0 |
Lower bound of the uniform prior for the concentration parameter for the DPM, default value is alpha.0 = 0.03. |
alpha.1 |
Upper bound of the uniform prior for the concentration parameter for the DPM, default value is alpha.1 = 10. |
K |
Maximum number of clusters in the DPM, default value is K = 30. |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcmeta can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "dpmetareg". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E. (2021) A Bias-Corrected Meta-Analysis Model for Combining Studies of Different Types and Quality. Biometrical Journal; 1–17.
## Not run: library(jarbes) ## End(Not run)## Not run: library(jarbes) ## End(Not run)
This function performers a Bayesian meta-analysis with DPM as random effects
dpmmeta( data, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, alpha.0 = 0.03, alpha.1 = 10, K = 5, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )dpmmeta( data, mean.mu.0 = 0, sd.mu.0 = 10, scale.sigma.between = 0.5, df.scale.between = 1, alpha.0 = 0.03, alpha.1 = 10, K = 5, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame with at least two columns with the following names: 1) TE = treatment effect, 2) seTE = the standard error of the treatment effect. |
mean.mu.0 |
Prior mean of the mean of the base distribution default value is mean.mu.0 = 0. |
sd.mu.0 |
Prior standard deviation of the base distribution, the default value is 10. |
scale.sigma.between |
Prior scale parameter for scale gamma distribution for the precision between studies. The default value is 0.5. |
df.scale.between |
Degrees of freedom of the scale gamma distribution for the precision between studies. The default value is 1, which results in a Half Cauchy distribution for the standard deviation between studies. Larger values e.g. 30 corresponds to a Half Normal distribution. |
alpha.0 |
Lower bound of the uniform prior for the concentration parameter for the DPM, default value is alpha.0 = 0.03. |
alpha.1 |
Upper bound of the uniform prior for the concentration parameter for the DPM, default value is alpha.1 = 10. |
K |
Maximum number of clusters in the DPM, default value is K = 5. |
nr.chains |
Number of chains for the MCMC computations, default 2. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discard for burn-in period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The results of the object of the class bcmeta can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
This function returns an object of the class "bmeta". This object contains the MCMC output of each parameter and hyper-parameter in the model and the data frame used for fitting the model.
Verde, P.E. (2021) A Bias-Corrected Meta-Analysis Model for Combining Studies of Different Types and Quality. Biometrical Journal; 1–17.
## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect bm1 = dpmmeta(stemcells) summary(bm1) plot(bm1, x.lim = c(-1, 7), y.lim = c(0, 1)) diagnostic(bm1, study.names = stemcells$trial, post.p.value.cut = 0.05, lwd.forest = 0.5, shape.forest = 4) diagnostic(bm1, post.p.value.cut = 0.05, lwd.forest = 0.5, shape.forest = 4) ## End(Not run)## Not run: library(jarbes) # Example: Stemcells data("stemcells") stemcells$TE = stemcells$effect.size stemcells$seTE = stemcells$se.effect bm1 = dpmmeta(stemcells) summary(bm1) plot(bm1, x.lim = c(-1, 7), y.lim = c(0, 1)) diagnostic(bm1, study.names = stemcells$trial, post.p.value.cut = 0.05, lwd.forest = 0.5, shape.forest = 4) diagnostic(bm1, post.p.value.cut = 0.05, lwd.forest = 0.5, shape.forest = 4) ## End(Not run)
Generic effect function.
effect(object, ...)effect(object, ...)
object |
The object generated by the function hmr. |
... |
... |
This function estimates the posterior distribution for a subgroup of patients identified with the function hmr (Hierarchical Meta-Regression).
## S3 method for class 'hmr' effect( object, B.lower = 0, B.upper = 3, k = 1, level = c(0.5, 0.75, 0.95), x.lim = c(-9, 5), y.lim = c(-1, 5), x.lab = "Baseline risk", y.lab = "Effectiveness", title.plot = paste("Posterior Effectiveness for a subgroup (50%, 75% and 95%)"), kde2d.n = 25, marginals = TRUE, bin.hist = 30, color.line = "black", color.hist = "white", color.data.points = "black", alpha.data.points = 0.1, S = 5000, display.probability = FALSE, line.no.effect = 0, font.size.title = 20, ... )## S3 method for class 'hmr' effect( object, B.lower = 0, B.upper = 3, k = 1, level = c(0.5, 0.75, 0.95), x.lim = c(-9, 5), y.lim = c(-1, 5), x.lab = "Baseline risk", y.lab = "Effectiveness", title.plot = paste("Posterior Effectiveness for a subgroup (50%, 75% and 95%)"), kde2d.n = 25, marginals = TRUE, bin.hist = 30, color.line = "black", color.hist = "white", color.data.points = "black", alpha.data.points = 0.1, S = 5000, display.probability = FALSE, line.no.effect = 0, font.size.title = 20, ... )
object |
The object generated by the function hmr. |
B.lower |
Lower limit of bias correction. The default is 0 meaning no bias correction. |
B.upper |
Upper limit of bias correction. The default is 3 meaning three times bias correction. |
k |
Covariable number indicating the subgroup. |
level |
Vector with the probability levels of the contour plot. The default values are: 0.5, 0.75, and 0.95. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the bias plot. |
kde2d.n |
The number of grid points in each direction for the non-parametric density estimation. The default is 25. |
marginals |
If TRUE the marginal histograms of the posteriors are added to the plot. |
bin.hist |
The number of bins in for the histograms. The default value is 30. |
color.line |
The color of the contour lines. The default is "black. |
color.hist |
The color of the histogram bars. The default is "white". |
color.data.points |
The color of the data points. The default is "black". |
alpha.data.points |
Transparency of the data points. |
S |
The number of sample values from the joint posterior distribution used to approximate the contours. The default is S=5000. |
display.probability |
Logical, if TRUE the figure display probabilities. |
line.no.effect |
Horizontal line used as reference for no effect. |
font.size.title |
Font size of the title. |
... |
... |
A dataset summarizing the variation in false-negative rates of reverse transcriptase polymerase chain reaction (RT-PCR)–based SARS-CoV-2 tests as a function of time since exposure.
A data frame with 410 rows and 11 columns. Each row represents the results from a study. The columns include:
Name of the author conducting the study.
Type of testing performed.
Number of days since symptom onset.
Minimum number of days since symptom onset. Applicable for studies by Guo et al. and Kim et al.
Maximum number of days since symptom onset. Applicable for studies by Guo et al. and Kim et al.
Total number of tests conducted on a given day.
Number of positive test results.
Number of inconclusive test results. Applicable for studies by Kujawski et al. and Danis et al.
Number of positive but non-quantifiable test results, where the viral load is below the quantification threshold of log10(1) copies/1000 cells.
Proportion of positive tests expressed as a percentage.
Kucirka LM, Lauer SA, Laeyendecker O, Boon D, Lessler J. Variation in False-Negative Rate of Reverse Transcriptase Polymerase Chain Reaction-Based SARS-CoV-2 Tests by Time Since Exposure. Ann Intern Med. 2020 Aug 18;173(4):262-267. doi: 10.7326/M20-1495. Epub 2020 May 13. PMID: 32422057; PMCID: PMC7240870.
Creates a forest plot comparing parameter estimates from either: - a single model with one parameter set. - a single model with two different parameter sets. - two different models with matching parameters.
forestplot_compare( model1, model2 = NULL, pars, pars2 = NULL, plotmath.labels = NULL, plotmath.labels2 = NULL, study.labels = NULL, consolidate.param.labels = FALSE, model1.name = "Model 1", model2.name = "Model 2", model.legend.title = "Model", ref.lines = c(0), colors = c("blue", "red"), point.size = 3, point.shapes = c(16, 17), prob = 0.5, prob.outer = 0.9, point.est = "median", x.lab = "Estimate", y.lab = NULL, inner.line.thickness = 1.5, outer.line.thickness = 0.5, x.lim = NULL, param.distance = 0.3, group.spacing = 1, flip.coords = FALSE, x.label.angle = 0, study.label.size = 11, ... )forestplot_compare( model1, model2 = NULL, pars, pars2 = NULL, plotmath.labels = NULL, plotmath.labels2 = NULL, study.labels = NULL, consolidate.param.labels = FALSE, model1.name = "Model 1", model2.name = "Model 2", model.legend.title = "Model", ref.lines = c(0), colors = c("blue", "red"), point.size = 3, point.shapes = c(16, 17), prob = 0.5, prob.outer = 0.9, point.est = "median", x.lab = "Estimate", y.lab = NULL, inner.line.thickness = 1.5, outer.line.thickness = 0.5, x.lim = NULL, param.distance = 0.3, group.spacing = 1, flip.coords = FALSE, x.label.angle = 0, study.label.size = 11, ... )
model1 |
First model object. Can be an 'mcmc.list' object, a model with BUGS output, a matrix, or a data frame of MCMC draws. |
model2 |
Optional second model object. If omitted, the function can compare two parameter sets within model1. Accepted types are the same as 'model1'. |
pars |
Character vector of parameter names for the first model or first parameter set |
pars2 |
Optional character vector of parameter names for the second parameter set in model1. Ignored if model2 is provided. |
plotmath.labels |
Optional vector of plotmath expressions as strings to label parameters in the first model or set. |
plotmath.labels2 |
Optional vector of plotmath expressions for parameters in the second parameter set in model1. |
study.labels |
Optional character vector of labels to use for studies on the y-axis. If provided, these labels will replace parameter names, and each study label will correspond to a pair of estimates. |
consolidate.param.labels |
Logical. If 'TRUE' and 'study.labels' is 'NULL' for comparison plots, displays a single consolidated label for the parameter pair. If 'FALSE' (default), displays a label for each individual parameter. Ignored for single model plots. |
model1.name |
Label for the first model in the plot legend. |
model2.name |
Label for the second model or parameter set in the legend. |
model.legend.title |
Title for the model legend. |
ref.lines |
Numeric vector of vertical reference lines to display. |
colors |
Vector of colors for each model or parameter set. |
point.size |
Size of point estimate markers. |
point.shapes |
Shapes used for points corresponding to each model or set |
prob |
Width of the inner credible interval (e.g. 0.5 for 50 % interval). |
prob.outer |
Width of the outer credible interval (e.g. 0.9 for 90% interval). |
point.est |
Which point estimate to use: "median" or "mean", default is "median". |
x.lab |
Label for the x-axis. |
y.lab |
Label for the y-axis. |
inner.line.thickness |
Thickness of inner credible interval lines. |
outer.line.thickness |
Thickness of outer credible interval lines. |
x.lim |
Optional numeric vector of length two to fix x-axis limits. |
param.distance |
Numeric, controls the vertical distance between points for different models/parameter sets within the same study. Default is 0.3. |
group.spacing |
Numeric, controls the vertical spacing between different studies/group of parameters. Default is 1. |
flip.coords |
Logical, if TRUE, flips the x and y axes, creating a horizontal plot. Default is FALSE. |
x.label.angle |
Numeric. Angle for x-axis labels when 'flip.coords = TRUE'. Default is 0. |
study.label.size |
Numeric. Text size for study or parameter labels on the y-axis (or x-axis if flipped). |
... |
... |
This dataset contains the results of 30 studies on the ganzfeld procedure, a technique used in parapsychology to test for extrasensory perception (ESP). Each row represents a study, with columns for the study ID, author, year of publication, number of hits (successful ESP trials), and total number of trials conducted.
A data frame with 30 rows and 5 columns.
Study ID
First author
Year of publication
Number of trials
Number of hits
Storm, Lance, Patrizio E. Tressoldi, and Lorenzo Di Risio. "Meta-analysis of free-response studies, 1992–2008: Assessing the noise reduction model in parapsychology." Psychological bulletin 136.4 (2010): 471.
Meta-analysis of 35 randomized controlled trials investigating the effectiveness in the application of adjuvant therapies for diabetic patients compared to medical routine care, where the endpoint was healing without amputations within a period less than or equal to one year.
A matrix with 35 rows and 9 columns. Each row represents study results, the columns are:
Name of the first author and year.
Number of patients in the treatment group.
Number of patients in the control group.
Number of heal patients in the treatment group.
Number of heal patients in the control group.
Total number of drop out patients.
Length of followup in weeks.
Inclusion of patients with peripheral arterial disease.
Inclusion of patients with Wagner score 3 and 4.
The data were obtainded from: Centre for Clinical Practice at NICE (UK and others) (2011), Clinical guideline 119. Diabetic foot problems: Inpatient Management of Diabetic Foot Problems. Tech. rep., National Institute for Health and Clinical Excellence.
Verde, P.E. (2018) The Hierarchical Meta-Regression Approach and Learning from Clinical Evidence. Technical Report.
Prospective cohort study.
A dataframe with 260 rows and 18 columns. Each row represents a patient, the columns are:
Outcome variable: Healing without amputation with in one year.
Duration of leasions in days at baseline.
Peripheral arterial disease yes/no.
Neuropathy yes/no.
First ever lesion yes/no.
No continuous care yes/no.
yes/no.
Diabetes type 2 yes/no.
Insulin dependent yes/no.
HOCHD yes/no.
HOCHD yes/no.
CRF yes/no.
Dialysis yes/no.
DNOAP yes/no.
Ever smoke yes/no.
Age at baseline in years.
Diabetes duration at baseline.
Wagner score 1-2 vs. 3-4-5.
Morbach, S, et al. (2012). Long-Term Prognosis of Diabetic Foot Patients and Their Limbs: Amputation and death over the course of a decade,Diabetes Care, 35, 10, 2012-2017.
Verde, P.E. (2018) The Hierarchical Meta-Regression Approach and Learning from Clinical Evidence. Technical Report.
Meta-analysis of 15 studies investigating total hip replacement to compare the risk of revision of cemented and uncemented implantfixation modalities, by pooling treatment effectestimates from OS and RCTs.
A dataframe with 15 rows and 12 columns. Each row represents study results, the columns are:
Author and year.
Study desing.
Number of revisions.
Total number of cemmented cases.
Number of uncemented revisions.
Total number of uncemmented cases.
RR calculated from the two by two table.
Lower 95prc CI
Upper 95prc CI
Mean age of the study
Proportion of women in the study.
Time to follow-up in years.
Schnell-Inderst P, Iglesias CP, Arvandi M, Ciani O, Matteucci Gothe R, Peters J, Blom AW, Taylor RS and Siebert U (2017). A bias-adjusted evidence synthesis of RCT and observational data: the case of total hip replacement. Health Econ. 26(Suppl. 1): 46–69.
This function performers a Bayesian cross design synthesis. The function fits a hierarchical meta-regression model based on a bivariate random effects model.
hmr( data, two.by.two = TRUE, dataIPD, re = "normal", link = "logit", mean.mu.1 = 0, mean.mu.2 = 0, mean.mu.phi = 0, sd.mu.1 = 1, sd.mu.2 = 1, sd.mu.phi = 1, sigma.1.upper = 5, sigma.2.upper = 5, sigma.beta.upper = 5, mean.Fisher.rho = 0, sd.Fisher.rho = 1/sqrt(2), df = 4, df.estimate = FALSE, df.lower = 3, df.upper = 20, split.w = FALSE, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )hmr( data, two.by.two = TRUE, dataIPD, re = "normal", link = "logit", mean.mu.1 = 0, mean.mu.2 = 0, mean.mu.phi = 0, sd.mu.1 = 1, sd.mu.2 = 1, sd.mu.phi = 1, sigma.1.upper = 5, sigma.2.upper = 5, sigma.beta.upper = 5, mean.Fisher.rho = 0, sd.Fisher.rho = 1/sqrt(2), df = 4, df.estimate = FALSE, df.lower = 3, df.upper = 20, split.w = FALSE, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
Aggregated data results: a data frame where the first four columns containing the number of events in the control group (yc), the number of patients in the control group (nc), the number of events in the treatment group (yt) and the number of patients in the treatment group (nt). If two.by.two = TRUE a data frame where each line contains the trial results with column names: yc, nc, yt, nt. |
two.by.two |
If TRUE indicates that the trial results are with names: yc, nc, yt, nt. |
dataIPD |
Individual participant data: a data frame where the first column is the outcome variable and the other columns represent individual participant charachteristics. |
re |
Random effects distribution for the resulting model. Possible values are normal for bivariate random effects and sm for scale mixtures. |
link |
The link function used in the model. Possible values are logit, cloglog probit. |
mean.mu.1 |
Prior mean of baseline risk, default value is 0. |
mean.mu.2 |
Prior mean of treatment effect, default value is 0. |
mean.mu.phi |
Prior mean of the bias parameter which measures the difference between the baseline mean mu.1 and the intercept parameter of the logistic regression of the individual participant data. The defalut vaule is 0. |
sd.mu.1 |
Prior standard deviation of mu.1, default value is 1. The default prior of mu.1 is a logistic distribution with mean 0 and dispersion 1. The implicit prior for mu.1 in the probability scale is a uniform between 0 and 1. |
sd.mu.2 |
Prior standard deviation of mu.2, default value is 1. The default prior of mu.2 is a logistic distribution with mean 0 and dispersion 1. The implicit prior for mu.2 in the probability scale is a uniform between 0 and 1. |
sd.mu.phi |
Prior standard deviation of mu.phi, default value is 1. |
sigma.1.upper |
Upper bound of the uniform prior of sigma.1, default value is 5. |
sigma.2.upper |
Upper bound of the uniform prior of sigma.2, default value is 5. |
sigma.beta.upper |
Upper bound of the uniform prior of sigma.beta, default value is 5. |
mean.Fisher.rho |
Mean of rho in the Fisher scale, default value is 0. |
sd.Fisher.rho |
Standard deviation of rho in the Fisher scale, default value is 1/sqrt(2). |
df |
If de.estimate = FALSE, then df is the degrees of freedom for the scale mixture distribution, default value is 4. |
df.estimate |
Estimate the posterior of df. The default value is FALSE. |
df.lower |
Lower bound of the prior of df. The default value is 3. |
df.upper |
Upper bound of the prior of df. The default value is 30. |
split.w |
Split the w parameter in two independent weights one for each random effect. The default value is FALSE. |
nr.chains |
Number of chains for the MCMC computations, default 5. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, default is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discarded for burnin period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The number of events in the control and treated group are modeled with two conditional Binomial distributions and the random-effects are based on a bivariate scale mixture of Normals.
The individual participant data is modeled as a Bayesian logistic regression for participants in the control group. Coefficients in the regression are modeled as exchangeables.
The function calculates the implicit hierarchical meta-regression, where the treatment effect is regressed to the baseline risk (rate of events in the control group). The scale mixture weights are used to adjust for internal validity and structural outliers identification.
The implicit hierarchical meta-regression is used to predict the treatment effect for subgroups of individual participant data.
Computations are done by calling JAGS (Just Another Gibbs Sampler) to perform MCMC (Markov Chain Monte Carlo) sampling and returning an object of the class mcmc.list.
Installation of JAGS: It is important to note that R 3.3.0 introduced a major change in the use of toolchain for Windows. This new toolchain is incompatible with older packages written in C++. As a consequence, if the installed version of JAGS does not match the R installation, then the rjags package will spontaneously crash. Therefore, if a user works with R version >= 3.3.0, then JAGS must be installed with the installation program JAGS-4.2.0-Rtools33.exe. For users who continue using R 3.2.4 or an earlier version, the installation program for JAGS is the default installer JAGS-4.2.0.exe.
This function returns an object of the class "hmr". This object contains the MCMC output of each parameter and hyper-parameter in the model, the data frame used for fitting the model, the link function, type of random effects distribution and the splitting information for conflict of evidence analysis.
The results of the object of the class hmr can be extracted with R2jags. In addition a summary, a print and a plot function are implemented for this type of object.
Verde, P.E, Ohmann, C., Icks, A. and Morbach, S. (2016) Bayesian evidence synthesis and combining randomized and nonrandomized results: a case study in diabetes. Statistics in Medicine. Volume 35, Issue 10, 10 May 2016, Pages: 1654 to 1675.
Verde, P. E. (2019) Learning from Clinical Evidence: The Hierarchical Meta-Regression Approach. Biometrical Journal. Biometrical Journal; 1-23.
## Not run: library(jarbes) data("healing") AD <- healing[, c("y_c", "n_c", "y_t", "n_t")] data("healingipd") IPD <- healingipd[, c("healing.without.amp", "PAD", "neuropathy", "first.ever.lesion", "no.continuous.care", "male", "diab.typ2", "insulin", "HOCHD", "HOS", "CRF", "dialysis", "DNOAP", "smoking.ever", "diabdur", "wagner.class")] mx2 <- hmr(AD, two.by.two = FALSE, dataIPD = IPD, re = "sm", link = "logit", sd.mu.1 = 2, sd.mu.2 = 2, sd.mu.phi = 2, sigma.1.upper = 5, sigma.2.upper = 5, sigma.beta.upper = 5, sd.Fisher.rho = 1.25, df.estimate = FALSE, df.lower = 3, df.upper = 10, nr.chains = 1, nr.iterations = 1500, nr.adapt = 100, nr.thin = 1) print(mx2) # This experiment corresponds to Section 4 in Verde (2018). # # Experiment: Combining aggretated data from RCTs and a single # observational study with individual participant data. # # In this experiment we assess conflict of evidence between the RCTs # and the observational study with a partially identified parameter # mu.phi. # # We run two simulated data: 1) mu.phi = 0.5 which is diffucult to # identify. 2) mu.phi = 2 which can be identify. The simulations are # used to see if the hmr() function can recover mu.phi. # library(MASS) library(ggplot2) library(jarbes) library(gridExtra) library(mcmcplots) library(R2jags) # Simulation of the IPD data invlogit <- function (x) { 1/(1 + exp(-x)) } #Experiment 1: External validity bias set.seed(2018) # mean control pc <- 0.7 # mean treatment pt <- 0.4 # reduction of "amputations" odds ratio OR <- (pt/(1-pt)) /(pc/(1-pc)) OR # mu_2 log(OR) mu.2.true <- log(OR) #sigma_2 sigma.2.true <- 0.5 # mu_1 mu.1.true <- log(pc/(1-pc)) mu.1.true #sigma_1 sigma.1.true <- 1 # rho rho.true <- -0.5 Sigma <- matrix(c(sigma.1.true^2, sigma.1.true*sigma.2.true*rho.true, sigma.1.true*sigma.2.true*rho.true, sigma.2.true^2), byrow = TRUE, ncol = 2) Sigma theta <- mvrnorm(35, mu = c(mu.1.true, mu.2.true), Sigma = Sigma ) plot(theta, xlim = c(-2,3)) abline(v=mu.1.true, lty = 2) abline(h=mu.2.true, lty = 2) abline(a = mu.2.true, b=sigma.2.true/sigma.1.true * rho.true, col = "red") abline(lm(theta[,2]~theta[,1]), col = "blue") # Target group mu.T <- mu.1.true + 2 * sigma.1.true abline(v=mu.T, lwd = 3, col = "blue") eta.true <- mu.2.true + sigma.2.true/sigma.1.true*rho.true* mu.T eta.true exp(eta.true) abline(h = eta.true, lty =3, col = "blue") # Simulation of each primary study: n.c <- round(runif(35, min = 30, max = 60),0) n.t <- round(runif(35, min = 30, max = 60),0) y.c <- y.t <- rep(0, 35) p.c <- exp(theta[,1])/(1+exp(theta[,1])) p.t <- exp(theta[,2]+theta[,1])/(1+exp(theta[,2]+theta[,1])) for(i in 1:35) { y.c[i] <- rbinom(1, n.c[i], prob = p.c[i]) y.t[i] <- rbinom(1, n.t[i], prob = p.t[i]) } AD.s1 <- data.frame(yc=y.c, nc=n.c, yt=y.t, nt=n.t) # Data set for mu.phi = 0.5 ......................................... # Parameters values mu.phi.true <- 0.5 pc = 0.7 mu.1.true= log(pc/(1-pc)) beta0 <- mu.1.true + mu.phi.true beta1 <- 2.5 beta2 <- 2 # Regression variables x1 <- rnorm(200) x2 <- rbinom(200, 1, 0.5) # Binary outcome as a function of "b0 + b1 * x1 + b2 * x2" y <- rbinom(200, 1, invlogit(beta0 + beta1 * x1 + beta2 * x2)) # Preparing the plot to visualize the data jitter.binary <- function(a, jitt = 0.05) ifelse(a==0, runif(length(a), 0, jitt), runif(length(a), 1-jitt, 1)) plot(x1, jitter.binary(y), xlab = "x1", ylab = "Success probability") curve(invlogit(beta0 + beta1*x), from = -2.5, to = 2.5, add = TRUE, col ="blue", lwd = 2) curve(invlogit(beta0 + beta1*x + beta2), from = -2.5, to = 2.5, add = TRUE, col ="red", lwd =2) legend("bottomright", c("b2 = 0", "b2 = 2"), col = c("blue", "red"), lwd = 2, lty = 1) noise <- rnorm(100*20) dim(noise) <- c(100, 20) n.names <- paste(rep("x", 20), seq(3, 22), sep="") colnames(noise) <- n.names data.IPD <- data.frame(y, x1, x2, noise) # Application of HMR ........................................... res.s2 <- hmr(AD.s1, two.by.two = FALSE, dataIPD = data.IPD, sd.mu.1 = 2, sd.mu.2 = 2, sd.mu.phi = 2, sigma.1.upper = 5, sigma.2.upper = 5, sd.Fisher.rho = 1.5, parallel="jags.parallel") print(res.s2) # Data set for mu.phi = 2 ...................................... # Parameters values mu.phi.true <- 2 beta0 <- mu.1.true + mu.phi.true beta1 <- 2.5 beta2 <- 2 # Regression variables x1 <- rnorm(200) x2 <- rbinom(200, 1, 0.5) # Binary outcome as a function of "b0 + b1 * x1 + b2 * x2" y <- rbinom(200, 1, invlogit(beta0 + beta1 * x1 + beta2 * x2)) # Preparing the plot to visualize the data jitter.binary <- function(a, jitt = 0.05) ifelse(a==0, runif(length(a), 0, jitt), runif(length(a), 1-jitt, 1)) plot(x1, jitter.binary(y), xlab = "x1", ylab = "Success probability") curve(invlogit(beta0 + beta1*x), from = -2.5, to = 2.5, add = TRUE, col ="blue", lwd = 2) curve(invlogit(beta0 + beta1*x + beta2), from = -2.5, to = 2.5, add = TRUE, col ="red", lwd =2) legend("bottomright", c("b2 = 0", "b2 = 2"), col = c("blue", "red"), lwd = 2, lty = 1) noise <- rnorm(100*20) dim(noise) <- c(100, 20) n.names <- paste(rep("x", 20), seq(3, 22), sep="") colnames(noise) <- n.names data.IPD <- data.frame(y, x1, x2, noise) # Application of HMR ............................................ res.s3 <- hmr(AD.s1, two.by.two = FALSE, dataIPD = data.IPD, sd.mu.1 = 2, sd.mu.2 = 2, sd.mu.phi = 2, sigma.1.upper = 5, sigma.2.upper = 5, sd.Fisher.rho = 1.5, parallel="jags.parallel" ) print(res.s3) # Posteriors for mu.phi ............................ attach.jags(res.s2) mu.phi.0.5 <- mu.phi df.phi.05 <- data.frame(x = mu.phi.0.5) attach.jags(res.s3) mu.phi.1 <- mu.phi df.phi.1 <- data.frame(x = mu.phi.1) p1 <- ggplot(df.phi.05, aes(x=x))+ xlab(expression(mu[phi])) + ylab("Posterior distribution")+ xlim(c(-7,7))+ geom_histogram(aes(y=..density..),fill = "royalblue", colour = "black", alpha= 0.4, bins=60) + geom_vline(xintercept = 0.64, colour = "black", size = 1.7, lty = 2)+ geom_vline(xintercept = 0.5, colour = "black", size = 1.7, lty = 1)+ stat_function(fun = dlogis, n = 101, args = list(location = 0, scale = 1), size = 1.5) + theme_bw() p2 <- ggplot(df.phi.1, aes(x=x))+ xlab(expression(mu[phi])) + ylab("Posterior distribution")+ xlim(c(-7,7))+ geom_histogram(aes(y=..density..),fill = "royalblue", colour = "black", alpha= 0.4, bins=60) + geom_vline(xintercept = 2.2, colour = "black", size = 1.7, lty = 2)+ geom_vline(xintercept = 2, colour = "black", size = 1.7, lty = 1)+ stat_function(fun = dlogis, n = 101, args = list(location = 0, scale = 1), size = 1.5) + theme_bw() grid.arrange(p1, p2, ncol = 2, nrow = 1) # Cater plots for regression coefficients ........................... var.names <- names(data.IPD[-1]) v <- paste("beta", names(data.IPD[-1]), sep = ".") mcmc.x.2 <- as.mcmc.rjags(res.s2) mcmc.x.3 <- as.mcmc.rjags(res.s3) greek.names <- paste(paste("beta[",1:22, sep=""),"]", sep="") par.names <- paste(paste("beta.IPD[",1:22, sep=""),"]", sep="") caterplot_compare(mcmc.x.2, mcmc.x.3, par.names, plotmath_labels = greek.names, ref_lines = c(0, 2, 2.5)) # End of the examples. ## End(Not run)## Not run: library(jarbes) data("healing") AD <- healing[, c("y_c", "n_c", "y_t", "n_t")] data("healingipd") IPD <- healingipd[, c("healing.without.amp", "PAD", "neuropathy", "first.ever.lesion", "no.continuous.care", "male", "diab.typ2", "insulin", "HOCHD", "HOS", "CRF", "dialysis", "DNOAP", "smoking.ever", "diabdur", "wagner.class")] mx2 <- hmr(AD, two.by.two = FALSE, dataIPD = IPD, re = "sm", link = "logit", sd.mu.1 = 2, sd.mu.2 = 2, sd.mu.phi = 2, sigma.1.upper = 5, sigma.2.upper = 5, sigma.beta.upper = 5, sd.Fisher.rho = 1.25, df.estimate = FALSE, df.lower = 3, df.upper = 10, nr.chains = 1, nr.iterations = 1500, nr.adapt = 100, nr.thin = 1) print(mx2) # This experiment corresponds to Section 4 in Verde (2018). # # Experiment: Combining aggretated data from RCTs and a single # observational study with individual participant data. # # In this experiment we assess conflict of evidence between the RCTs # and the observational study with a partially identified parameter # mu.phi. # # We run two simulated data: 1) mu.phi = 0.5 which is diffucult to # identify. 2) mu.phi = 2 which can be identify. The simulations are # used to see if the hmr() function can recover mu.phi. # library(MASS) library(ggplot2) library(jarbes) library(gridExtra) library(mcmcplots) library(R2jags) # Simulation of the IPD data invlogit <- function (x) { 1/(1 + exp(-x)) } #Experiment 1: External validity bias set.seed(2018) # mean control pc <- 0.7 # mean treatment pt <- 0.4 # reduction of "amputations" odds ratio OR <- (pt/(1-pt)) /(pc/(1-pc)) OR # mu_2 log(OR) mu.2.true <- log(OR) #sigma_2 sigma.2.true <- 0.5 # mu_1 mu.1.true <- log(pc/(1-pc)) mu.1.true #sigma_1 sigma.1.true <- 1 # rho rho.true <- -0.5 Sigma <- matrix(c(sigma.1.true^2, sigma.1.true*sigma.2.true*rho.true, sigma.1.true*sigma.2.true*rho.true, sigma.2.true^2), byrow = TRUE, ncol = 2) Sigma theta <- mvrnorm(35, mu = c(mu.1.true, mu.2.true), Sigma = Sigma ) plot(theta, xlim = c(-2,3)) abline(v=mu.1.true, lty = 2) abline(h=mu.2.true, lty = 2) abline(a = mu.2.true, b=sigma.2.true/sigma.1.true * rho.true, col = "red") abline(lm(theta[,2]~theta[,1]), col = "blue") # Target group mu.T <- mu.1.true + 2 * sigma.1.true abline(v=mu.T, lwd = 3, col = "blue") eta.true <- mu.2.true + sigma.2.true/sigma.1.true*rho.true* mu.T eta.true exp(eta.true) abline(h = eta.true, lty =3, col = "blue") # Simulation of each primary study: n.c <- round(runif(35, min = 30, max = 60),0) n.t <- round(runif(35, min = 30, max = 60),0) y.c <- y.t <- rep(0, 35) p.c <- exp(theta[,1])/(1+exp(theta[,1])) p.t <- exp(theta[,2]+theta[,1])/(1+exp(theta[,2]+theta[,1])) for(i in 1:35) { y.c[i] <- rbinom(1, n.c[i], prob = p.c[i]) y.t[i] <- rbinom(1, n.t[i], prob = p.t[i]) } AD.s1 <- data.frame(yc=y.c, nc=n.c, yt=y.t, nt=n.t) # Data set for mu.phi = 0.5 ......................................... # Parameters values mu.phi.true <- 0.5 pc = 0.7 mu.1.true= log(pc/(1-pc)) beta0 <- mu.1.true + mu.phi.true beta1 <- 2.5 beta2 <- 2 # Regression variables x1 <- rnorm(200) x2 <- rbinom(200, 1, 0.5) # Binary outcome as a function of "b0 + b1 * x1 + b2 * x2" y <- rbinom(200, 1, invlogit(beta0 + beta1 * x1 + beta2 * x2)) # Preparing the plot to visualize the data jitter.binary <- function(a, jitt = 0.05) ifelse(a==0, runif(length(a), 0, jitt), runif(length(a), 1-jitt, 1)) plot(x1, jitter.binary(y), xlab = "x1", ylab = "Success probability") curve(invlogit(beta0 + beta1*x), from = -2.5, to = 2.5, add = TRUE, col ="blue", lwd = 2) curve(invlogit(beta0 + beta1*x + beta2), from = -2.5, to = 2.5, add = TRUE, col ="red", lwd =2) legend("bottomright", c("b2 = 0", "b2 = 2"), col = c("blue", "red"), lwd = 2, lty = 1) noise <- rnorm(100*20) dim(noise) <- c(100, 20) n.names <- paste(rep("x", 20), seq(3, 22), sep="") colnames(noise) <- n.names data.IPD <- data.frame(y, x1, x2, noise) # Application of HMR ........................................... res.s2 <- hmr(AD.s1, two.by.two = FALSE, dataIPD = data.IPD, sd.mu.1 = 2, sd.mu.2 = 2, sd.mu.phi = 2, sigma.1.upper = 5, sigma.2.upper = 5, sd.Fisher.rho = 1.5, parallel="jags.parallel") print(res.s2) # Data set for mu.phi = 2 ...................................... # Parameters values mu.phi.true <- 2 beta0 <- mu.1.true + mu.phi.true beta1 <- 2.5 beta2 <- 2 # Regression variables x1 <- rnorm(200) x2 <- rbinom(200, 1, 0.5) # Binary outcome as a function of "b0 + b1 * x1 + b2 * x2" y <- rbinom(200, 1, invlogit(beta0 + beta1 * x1 + beta2 * x2)) # Preparing the plot to visualize the data jitter.binary <- function(a, jitt = 0.05) ifelse(a==0, runif(length(a), 0, jitt), runif(length(a), 1-jitt, 1)) plot(x1, jitter.binary(y), xlab = "x1", ylab = "Success probability") curve(invlogit(beta0 + beta1*x), from = -2.5, to = 2.5, add = TRUE, col ="blue", lwd = 2) curve(invlogit(beta0 + beta1*x + beta2), from = -2.5, to = 2.5, add = TRUE, col ="red", lwd =2) legend("bottomright", c("b2 = 0", "b2 = 2"), col = c("blue", "red"), lwd = 2, lty = 1) noise <- rnorm(100*20) dim(noise) <- c(100, 20) n.names <- paste(rep("x", 20), seq(3, 22), sep="") colnames(noise) <- n.names data.IPD <- data.frame(y, x1, x2, noise) # Application of HMR ............................................ res.s3 <- hmr(AD.s1, two.by.two = FALSE, dataIPD = data.IPD, sd.mu.1 = 2, sd.mu.2 = 2, sd.mu.phi = 2, sigma.1.upper = 5, sigma.2.upper = 5, sd.Fisher.rho = 1.5, parallel="jags.parallel" ) print(res.s3) # Posteriors for mu.phi ............................ attach.jags(res.s2) mu.phi.0.5 <- mu.phi df.phi.05 <- data.frame(x = mu.phi.0.5) attach.jags(res.s3) mu.phi.1 <- mu.phi df.phi.1 <- data.frame(x = mu.phi.1) p1 <- ggplot(df.phi.05, aes(x=x))+ xlab(expression(mu[phi])) + ylab("Posterior distribution")+ xlim(c(-7,7))+ geom_histogram(aes(y=..density..),fill = "royalblue", colour = "black", alpha= 0.4, bins=60) + geom_vline(xintercept = 0.64, colour = "black", size = 1.7, lty = 2)+ geom_vline(xintercept = 0.5, colour = "black", size = 1.7, lty = 1)+ stat_function(fun = dlogis, n = 101, args = list(location = 0, scale = 1), size = 1.5) + theme_bw() p2 <- ggplot(df.phi.1, aes(x=x))+ xlab(expression(mu[phi])) + ylab("Posterior distribution")+ xlim(c(-7,7))+ geom_histogram(aes(y=..density..),fill = "royalblue", colour = "black", alpha= 0.4, bins=60) + geom_vline(xintercept = 2.2, colour = "black", size = 1.7, lty = 2)+ geom_vline(xintercept = 2, colour = "black", size = 1.7, lty = 1)+ stat_function(fun = dlogis, n = 101, args = list(location = 0, scale = 1), size = 1.5) + theme_bw() grid.arrange(p1, p2, ncol = 2, nrow = 1) # Cater plots for regression coefficients ........................... var.names <- names(data.IPD[-1]) v <- paste("beta", names(data.IPD[-1]), sep = ".") mcmc.x.2 <- as.mcmc.rjags(res.s2) mcmc.x.3 <- as.mcmc.rjags(res.s3) greek.names <- paste(paste("beta[",1:22, sep=""),"]", sep="") par.names <- paste(paste("beta.IPD[",1:22, sep=""),"]", sep="") caterplot_compare(mcmc.x.2, mcmc.x.3, par.names, plotmath_labels = greek.names, ref_lines = c(0, 2, 2.5)) # End of the examples. ## End(Not run)
This dataset is based on a comprehensive meta-analysis of 33 studies, sourced from various databases, including the Cochrane COVID-19 Study Register (comprising the Cochrane Central Register of Controlled Trials, Medline, Embase, clinicaltrials.gov, the World Health Organization's International Clinical Trials Registry Platform, and medRxiv) and the World Health Organization’s COVID-19 research database. The analysis focused on evaluating health outcomes related to Long-COVID in controlled studies. Specifically, it examines the health outcomes in terms of incident medicinal diagnoses.
The dataset includes the assessment of risk of bias based on the Joanna Briggs Institute (JBI) tool for cohort studies, along with various participant and study details such as sample size, effect type, follow-up time, and disease severity.
A data frame with 271 rows and 27 columns. Each row represents the results of a single study. The columns include:
Name of the first author and publication year.
Category of the health outcome.
Definition of the health outcome or disease.
Type of data source: Administrative data, Health records, Patients claims, Survey, Combination of health records and claims.
Total number of participants.
Type of effect reported: RR (Relative Risk), HR (Hazard Ratio), or OR (Odds Ratio).
Estimated effect based on the effect type.
Logarithm of the estimated effect.
Standard error of the logarithm of the estimated effect.
Event rate in the control group.
Follow-up time in weeks.
Mean age of the participants.
Indicator for inclusion of severe or critical disease participants ("no" or "yes").
Indicator for inclusion of reinfected participants ("no" or "yes").
Number of confounders for which adjustments were made in the study.
high if ROB4 OR ROB5 is high or unclear or low otherwise.
List of confounders considered in the study.
Were the two groups similar and recruited from the same population?
Were the exposures measured similarly to assign participants to exposed and unexposed groups?
Was the exposure measured in a valid and reliable way?
Were confounding factors identified?
Were strategies to address confounding factors stated?
Were the groups/participants free of the outcome at the start of the study (or at the moment of exposure)?
Were the outcomes measured in a valid and reliable way?
Was the follow-up time reported and sufficient to allow outcomes to occur?
Was follow-up complete, and if not, were the reasons for loss to follow-up described and explored?
Were strategies to address incomplete follow-up utilized?
Was appropriate statistical analysis used?
Franco JVA, Garegnani LI, Metzendorf MI, Heldt K, Mumm R, Scheidt-Nave C. Post-COVID-19 conditions in adults: systematic review and meta-analysis of health outcomes in controlled studies. BMJ Medicine. 2024;3:e000723.
Meta-analysis of 82 studies comparing 12-month visual acuity change results in routine clinical practices of intravitreal therapy for diabetic maculaedema (DME) to the change in RCTs by pooling data published in the last decade on treated eyes of treatment effect from OS.
A dataframe with 83 rows and 24 columns. Each row represents study results, the columns are:
Used Medication
Author and year.
Study type/Design
Number of tested eyes.
Mean Change in Visual Acuity after 12-Months. Where Visual Acuity is measured in VAR (Visual Acuity Rating) score
Standard Error of the Treatment Effect
Lower 95prc CI for TE
Upper 95prc CI for TE
Number of Patients in Study at Baseline
The mean age of patients per study
The standard deviation of age of patients per study
The standard error of age of patients per study
Mean Visual Acuity at Baseline. Where Visual Acuity is measured in VAR (Visual Acuity Rating) score
The standard deviation of Visual Acuity at Baseline. Where Visual Acuity is measured in VAR (Visual Acuity Rating) score
The standard error of Visual Acuity at Baseline. Where Visual Acuity is measured in VAR (Visual Acuity Rating) score
Mean Visual Acuity after 12 months. Where Visual Acuity is measured in VAR (Visual Acuity Rating) score
The standard deviation of Visual Acuity after 12 months. Where Visual Acuity is measured in VAR (Visual Acuity Rating) score
The standard error of Visual Acuity after 12 months. Where Visual Acuity is measured in VAR (Visual Acuity Rating) score
Mean Central Subfield Thickness at Baseline
The standard deviation of Central Subfield Thickness at Baseline
The standard error of Central Subfield Thickness at Baseline
Mean Central Subfield Thickness after 12 months
The standard deviation of Central Subfield Thickness after 12 months
The standard error of Central Subfield Thickness after 12 months
Mehta H, Nguyen V, Barthelmes D, Pershing S, Chi GC, Dopart P, Gillies MC. Outcomes of Over 40,000 Eyes Treated for Diabetic Macula Edema in Routine Clinical Practice: A Systematic Review and Meta-analysis. Adv Ther. 2022 Dec;39(12):5376-5390. doi: 10.1007/s12325-022-02326-8. Epub 2022 Oct 15. PMID: 36241963; PMCID: PMC9618488.
This function performers a Bayesian meta-analysis to analyse heterogeneity of the treatment effect as a function of the baseline risk. The function fits a hierarchical meta-regression model based on a bivariate random effects model.
metarisk( data, two.by.two = TRUE, re = "normal", link = "logit", mean.mu.1 = 0, mean.mu.2 = 0, sd.mu.1 = 1, sd.mu.2 = 1, sigma.1.upper = 5, sigma.2.upper = 5, mean.Fisher.rho = 0, sd.Fisher.rho = 1/sqrt(2), df = 4, df.estimate = FALSE, df.lower = 3, df.upper = 20, split.w = FALSE, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )metarisk( data, two.by.two = TRUE, re = "normal", link = "logit", mean.mu.1 = 0, mean.mu.2 = 0, sd.mu.1 = 1, sd.mu.2 = 1, sigma.1.upper = 5, sigma.2.upper = 5, mean.Fisher.rho = 0, sd.Fisher.rho = 1/sqrt(2), df = 4, df.estimate = FALSE, df.lower = 3, df.upper = 20, split.w = FALSE, nr.chains = 2, nr.iterations = 10000, nr.adapt = 1000, nr.burnin = 1000, nr.thin = 1, parallel = NULL )
data |
A data frame where the first four columns containing the number of events in the control group (yc), the number of patients in the control group (nc), the number of events in the treatment group (yt) and the number of patients in the treatment group (nt). If two.by.two = TRUE a data frame where each line contains the trial results with column names: yc, nc, yt, nt. |
two.by.two |
If TRUE indicates that the trial results are with names: yc, nc, yt, nt. |
re |
Random effects distribution for the resulting model. Possible values are normal for bivariate random effects and sm for scale mixtures. |
link |
The link function used in the model. Possible values are logit, cloglog probit. |
mean.mu.1 |
Prior mean of baseline risk, default value is 0. |
mean.mu.2 |
Prior mean of the relative treatment effect, default value is 0. |
sd.mu.1 |
Prior standard deviation of mu.1, default value is 1. The default prior of mu.1 is a logistic distribution with mean 0 and dispersion 1. The implicit prior for mu.1 in the probability scale is a uniform between 0 and 1. |
sd.mu.2 |
Prior standard deviation of mu.2, default value is 1. The default prior of mu.2 is a logistic distribution with mean 0 and dispersion 1. The implicit prior for mu.2 in the probability scale is a uniform between 0 and 1. |
sigma.1.upper |
Upper bound of the uniform prior of sigma.1, default value is 5. |
sigma.2.upper |
Upper bound of the uniform prior of sigma.2, default value is 5. |
mean.Fisher.rho |
Mean of rho in the Fisher scale default value is 0. |
sd.Fisher.rho |
Standard deviation of rho in the Fisher scale, default value is 1/sqrt(2). |
df |
If de.estimate = FALSE, then df is the degrees of freedom for the scale mixture distribution, default value is 4. |
df.estimate |
Estimate the posterior of df. The default value is FALSE. |
df.lower |
Lower bound of the prior of df. The default value is 3. |
df.upper |
Upper bound of the prior of df. The default value is 30. |
split.w |
Split the w parameter in two independent weights one for each random effect. The default value is FALSE. |
nr.chains |
Number of chains for the MCMC computations, default 5. |
nr.iterations |
Number of iterations after adapting the MCMC, default is 10000. Some models may need more iterations. |
nr.adapt |
Number of iterations in the adaptation process, defualt is 1000. Some models may need more iterations during adptation. |
nr.burnin |
Number of iteration discared for burnin period, default is 1000. Some models may need a longer burnin period. |
nr.thin |
Thinning rate, it must be a positive integer, the default value is 1. |
parallel |
NULL -> jags, 'jags.parallel' -> jags.parallel execution |
The number of events in the control and treated group are modeled with two conditional Binomial distributions and the random-effects are based on a bivariate scale mixture of Normals.
The function calculates the implicit hierarchical meta-regression, where the treatment effect is regressed to the baseline risk (rate of events in the control group). The scale mixture weights are used to adjust for internal validity and structural outliers identification.
Computations are done by calling JAGS (Just Another Gibbs Sampler) to perform MCMC (Markov Chain Monte Carlo) sampling and returning an object of the class mcmc.list.
This function returns an object of the class "metarisk". This object contains the MCMC output of each parameter and hyper-parameter in the model, the data frame used for fitting the model, the link function, type of random effects distribution and the splitting information for conflict of evidence analysis.
The results of the object of the class metadiag can be extracted with R2jags or with rjags. In addition a summary, a print and a plot functions are implemented for this type of object.
Verde, P.E. (2019) The hierarchical meta-regression approach and learning from clinical evidence. Biometrical Journal. 1 - 23.
Verde, P. E. (2017) Two Examples of Bayesian Evidence Synthesis with the Hierarchical Meta-Regression Approach. Chap.9, pag 189-206. Bayesian Inference, ed. Tejedor, Javier Prieto. InTech.
## Not run: library(jarbes) # This example is used to test the function and it runs in about 5 seconds. # In a real application you must increase the number of MCMC interations. # For example use: nr.burnin = 5000 and nr.iterations = 20000 # The following examples corresponds to Section 4 in Verde (2019). # These are simulated examples to investigate internal and # external validity bias in meta-analysis. library(MASS) library(ggplot2) library(jarbes) library(gridExtra) #Experiment 1: External validity bias set.seed(2018) # mean control pc <- 0.7 # mean treatment pt <- 0.4 # reduction of "amputations" odds ratio OR <- (pt/(1-pt)) /(pc/(1-pc)) OR # mu_2 log(OR) mu.2.true <- log(OR) #sigma_2 sigma.2.true <- 0.5 # mu_1 mu.1.true <- log(pc/(1-pc)) mu.1.true #sigma_1 sigma.1.true <- 1 # rho rho.true <- -0.5 Sigma <- matrix(c(sigma.1.true^2, sigma.1.true*sigma.2.true*rho.true, sigma.1.true*sigma.2.true*rho.true, sigma.2.true^2), byrow = TRUE, ncol = 2) Sigma theta <- mvrnorm(35, mu = c(mu.1.true, mu.2.true), Sigma = Sigma ) plot(theta, xlim = c(-2,3)) abline(v=mu.1.true, lty = 2) abline(h=mu.2.true, lty = 2) abline(a = mu.2.true, b=sigma.2.true/sigma.1.true * rho.true, col = "red") abline(lm(theta[,2]~theta[,1]), col = "blue") # Target group mu.T <- mu.1.true + 2 * sigma.1.true abline(v=mu.T, lwd = 3, col = "blue") eta.true <- mu.2.true + sigma.2.true/sigma.1.true*rho.true* mu.T eta.true exp(eta.true) abline(h = eta.true, lty =3, col = "blue") # Simulation of each primary study: n.c <- round(runif(35, min = 30, max = 60),0) n.t <- round(runif(35, min = 30, max = 60),0) y.c <- y.t <- rep(0, 35) p.c <- exp(theta[,1])/(1+exp(theta[,1])) p.t <- exp(theta[,2]+theta[,1])/(1+exp(theta[,2]+theta[,1])) for(i in 1:35) { y.c[i] <- rbinom(1, n.c[i], prob = p.c[i]) y.t[i] <- rbinom(1, n.t[i], prob = p.t[i]) } AD.s1 <- data.frame(yc=y.c, nc=n.c, yt=y.t, nt=n.t) ########################################################## incr.e <- 0.05 incr.c <- 0.05 n11 <- AD.s1$yt n12 <- AD.s1$yc n21 <- AD.s1$nt - AD.s1$yt n22 <- AD.s1$nc - AD.s1$yc AD.s1$TE <- log(((n11 + incr.e)*(n22 + incr.c))/((n12 + incr.e) * (n21 + incr.c))) AD.s1$seTE <- sqrt((1/(n11 + incr.e) + 1/(n12 + incr.e) + 1/(n21 + incr.c) + 1/(n22 + incr.c))) Pc <- ((n12 + incr.c)/(AD.s1$nc + 2*incr.c)) AD.s1$logitPc <- log(Pc/(1-Pc)) AD.s1$Ntotal <- AD.s1$nc + AD.s1$nt rm(list=c("Pc", "n11","n12","n21","n22","incr.c", "incr.e")) dat.points <- data.frame(TE = AD.s1$TE, logitPc = AD.s1$logitPc, N.total = AD.s1$Ntotal) ################################################################### res.s1 <- metarisk(AD.s1, two.by.two = FALSE, sigma.1.upper = 5, sigma.2.upper = 5, sd.Fisher.rho = 1.5) print(res.s1, digits = 4) library(R2jags) attach.jags(res.s1) eta.hat <- mu.2 + rho*sigma.2/sigma.1*(mu.T - mu.1) mean(eta.hat) sd(eta.hat) OR.eta.hat <- exp(eta.hat) mean(OR.eta.hat) sd(OR.eta.hat) quantile(OR.eta.hat, probs = c(0.025, 0.5, 0.975)) ind.random <- sample(1:18000, size = 80, replace = FALSE) ############################################################## p1 <- ggplot(dat.points, aes(x = logitPc, y = TE, size = N.total)) + xlab("logit Baseline Risk")+ ylab("log(Odds Ratio)")+ geom_point(shape = 21, colour = "blue") + scale_size_area(max_size=10)+ scale_x_continuous(name= "Rate of The Control Group (logit scale)", limits=c(-2, 5)) + geom_vline(xintercept = mu.T, colour = "blue", size = 1, lty = 1) + geom_hline(yintercept = eta.true, colour = "blue", size = 1, lty = 1)+ geom_abline(intercept=beta.0[ind.random], slope=beta.1[ind.random],alpha=0.3, colour = "grey", size = 1.3, lty = 2)+ geom_abline(intercept = mean(beta.0[ind.random]), slope = mean(beta.1[ind.random]), colour = "black", size = 1.3, lty = 2)+ geom_abline(intercept = mu.2.true, slope = sigma.2.true/sigma.1.true * rho.true, colour = "blue", size = 1.2)+ theme_bw() # Posterior of eta.hat eta.df <- data.frame(x = OR.eta.hat) p2 <- ggplot(eta.df, aes(x = x)) + xlab("Odds Ratio") + ylab("Posterior distribution")+ geom_histogram(fill = "royalblue", colour = "black", alpha= 0.4, bins=80) + geom_vline(xintercept = exp(eta.true), colour = "black", size = 1.7, lty = 1)+ geom_vline(xintercept = c(0.28, 0.22, 0.35), colour = "black", size = 1, lty = 2)+ theme_bw() grid.arrange(p1, p2, ncol = 2, nrow = 1) #Experiment 2: Internal validity bias and assesing conflict of evidence between the RCTs. set.seed(2018) ind <- sample(1:35, size=5, replace = FALSE) ind AD.s4.contaminated <- AD.s1[ind,1:4] AD.s4.contaminated$yc <- AD.s1$yt[ind] AD.s4.contaminated$yt <- AD.s1$yc[ind] AD.s4.contaminated$nc <- AD.s1$nt[ind] AD.s4.contaminated$nt <- AD.s1$nc[ind] AD.s4.contaminated <- rbind(AD.s4.contaminated, AD.s1[-ind,1:4]) res.s4 <- metarisk(AD.s4.contaminated, two.by.two = FALSE, re = "sm", sigma.1.upper = 3, sigma.2.upper = 3, sd.Fisher.rho = 1.5, df.estimate = TRUE) print(res.s4, digits = 4) attach.jags(res.s4) w.s <- apply(w, 2, median) w.u <- apply(w, 2, quantile, prob = 0.75) w.l <- apply(w, 2, quantile, prob = 0.25) studies <- c(ind,c(1,3,4,5,6,8,9,10,11,13,14,17,18,19,20:35)) dat.weights <- data.frame(x = studies, y = w.s, ylo = w.l, yhi = w.u) # Outliers: w.col <- studies %in% ind w.col.plot <- ifelse(w.col, "black", "grey") w.col.plot[c(9,17, 19,27,34,35)] <- "black" w.plot <- function(d){ # d is a data frame with 4 columns # d$x gives variable names # d$y gives center point # d$ylo gives lower limits # d$yhi gives upper limits p <- ggplot(d, aes(x=x, y=y, ymin=ylo, ymax=yhi) )+ geom_pointrange( colour=w.col.plot, lwd =0.8)+ coord_flip() + geom_hline(yintercept = 1, lty=2)+ xlab("Study ID") + ylab("Scale mixture weights") + theme_bw() return(p)} w.plot(dat.weights) #List of other possible statistical models: # 1) Different link functions: logit, cloglog and probit # 2) Different random effects distributions: # "normal" or "sm = scale mixtures". # 3) For the scale mixture random effects: # split.w = TRUE => "split the weights". # 4) For the scale mixture random effects: # df.estimate = TRUE => "estimate the degrees of freedom". # 5) For the scale mixture random effects: # df.estimate = TRUE => "estimate the degrees of freedom". # 6) For the scale mixture random effects: # df = 4 => "fix the degrees of freedom to a particual value". # Note that df = 1 fits a Cauchy bivariate distribution to # the random effects. #End of the examples ## End(Not run)## Not run: library(jarbes) # This example is used to test the function and it runs in about 5 seconds. # In a real application you must increase the number of MCMC interations. # For example use: nr.burnin = 5000 and nr.iterations = 20000 # The following examples corresponds to Section 4 in Verde (2019). # These are simulated examples to investigate internal and # external validity bias in meta-analysis. library(MASS) library(ggplot2) library(jarbes) library(gridExtra) #Experiment 1: External validity bias set.seed(2018) # mean control pc <- 0.7 # mean treatment pt <- 0.4 # reduction of "amputations" odds ratio OR <- (pt/(1-pt)) /(pc/(1-pc)) OR # mu_2 log(OR) mu.2.true <- log(OR) #sigma_2 sigma.2.true <- 0.5 # mu_1 mu.1.true <- log(pc/(1-pc)) mu.1.true #sigma_1 sigma.1.true <- 1 # rho rho.true <- -0.5 Sigma <- matrix(c(sigma.1.true^2, sigma.1.true*sigma.2.true*rho.true, sigma.1.true*sigma.2.true*rho.true, sigma.2.true^2), byrow = TRUE, ncol = 2) Sigma theta <- mvrnorm(35, mu = c(mu.1.true, mu.2.true), Sigma = Sigma ) plot(theta, xlim = c(-2,3)) abline(v=mu.1.true, lty = 2) abline(h=mu.2.true, lty = 2) abline(a = mu.2.true, b=sigma.2.true/sigma.1.true * rho.true, col = "red") abline(lm(theta[,2]~theta[,1]), col = "blue") # Target group mu.T <- mu.1.true + 2 * sigma.1.true abline(v=mu.T, lwd = 3, col = "blue") eta.true <- mu.2.true + sigma.2.true/sigma.1.true*rho.true* mu.T eta.true exp(eta.true) abline(h = eta.true, lty =3, col = "blue") # Simulation of each primary study: n.c <- round(runif(35, min = 30, max = 60),0) n.t <- round(runif(35, min = 30, max = 60),0) y.c <- y.t <- rep(0, 35) p.c <- exp(theta[,1])/(1+exp(theta[,1])) p.t <- exp(theta[,2]+theta[,1])/(1+exp(theta[,2]+theta[,1])) for(i in 1:35) { y.c[i] <- rbinom(1, n.c[i], prob = p.c[i]) y.t[i] <- rbinom(1, n.t[i], prob = p.t[i]) } AD.s1 <- data.frame(yc=y.c, nc=n.c, yt=y.t, nt=n.t) ########################################################## incr.e <- 0.05 incr.c <- 0.05 n11 <- AD.s1$yt n12 <- AD.s1$yc n21 <- AD.s1$nt - AD.s1$yt n22 <- AD.s1$nc - AD.s1$yc AD.s1$TE <- log(((n11 + incr.e)*(n22 + incr.c))/((n12 + incr.e) * (n21 + incr.c))) AD.s1$seTE <- sqrt((1/(n11 + incr.e) + 1/(n12 + incr.e) + 1/(n21 + incr.c) + 1/(n22 + incr.c))) Pc <- ((n12 + incr.c)/(AD.s1$nc + 2*incr.c)) AD.s1$logitPc <- log(Pc/(1-Pc)) AD.s1$Ntotal <- AD.s1$nc + AD.s1$nt rm(list=c("Pc", "n11","n12","n21","n22","incr.c", "incr.e")) dat.points <- data.frame(TE = AD.s1$TE, logitPc = AD.s1$logitPc, N.total = AD.s1$Ntotal) ################################################################### res.s1 <- metarisk(AD.s1, two.by.two = FALSE, sigma.1.upper = 5, sigma.2.upper = 5, sd.Fisher.rho = 1.5) print(res.s1, digits = 4) library(R2jags) attach.jags(res.s1) eta.hat <- mu.2 + rho*sigma.2/sigma.1*(mu.T - mu.1) mean(eta.hat) sd(eta.hat) OR.eta.hat <- exp(eta.hat) mean(OR.eta.hat) sd(OR.eta.hat) quantile(OR.eta.hat, probs = c(0.025, 0.5, 0.975)) ind.random <- sample(1:18000, size = 80, replace = FALSE) ############################################################## p1 <- ggplot(dat.points, aes(x = logitPc, y = TE, size = N.total)) + xlab("logit Baseline Risk")+ ylab("log(Odds Ratio)")+ geom_point(shape = 21, colour = "blue") + scale_size_area(max_size=10)+ scale_x_continuous(name= "Rate of The Control Group (logit scale)", limits=c(-2, 5)) + geom_vline(xintercept = mu.T, colour = "blue", size = 1, lty = 1) + geom_hline(yintercept = eta.true, colour = "blue", size = 1, lty = 1)+ geom_abline(intercept=beta.0[ind.random], slope=beta.1[ind.random],alpha=0.3, colour = "grey", size = 1.3, lty = 2)+ geom_abline(intercept = mean(beta.0[ind.random]), slope = mean(beta.1[ind.random]), colour = "black", size = 1.3, lty = 2)+ geom_abline(intercept = mu.2.true, slope = sigma.2.true/sigma.1.true * rho.true, colour = "blue", size = 1.2)+ theme_bw() # Posterior of eta.hat eta.df <- data.frame(x = OR.eta.hat) p2 <- ggplot(eta.df, aes(x = x)) + xlab("Odds Ratio") + ylab("Posterior distribution")+ geom_histogram(fill = "royalblue", colour = "black", alpha= 0.4, bins=80) + geom_vline(xintercept = exp(eta.true), colour = "black", size = 1.7, lty = 1)+ geom_vline(xintercept = c(0.28, 0.22, 0.35), colour = "black", size = 1, lty = 2)+ theme_bw() grid.arrange(p1, p2, ncol = 2, nrow = 1) #Experiment 2: Internal validity bias and assesing conflict of evidence between the RCTs. set.seed(2018) ind <- sample(1:35, size=5, replace = FALSE) ind AD.s4.contaminated <- AD.s1[ind,1:4] AD.s4.contaminated$yc <- AD.s1$yt[ind] AD.s4.contaminated$yt <- AD.s1$yc[ind] AD.s4.contaminated$nc <- AD.s1$nt[ind] AD.s4.contaminated$nt <- AD.s1$nc[ind] AD.s4.contaminated <- rbind(AD.s4.contaminated, AD.s1[-ind,1:4]) res.s4 <- metarisk(AD.s4.contaminated, two.by.two = FALSE, re = "sm", sigma.1.upper = 3, sigma.2.upper = 3, sd.Fisher.rho = 1.5, df.estimate = TRUE) print(res.s4, digits = 4) attach.jags(res.s4) w.s <- apply(w, 2, median) w.u <- apply(w, 2, quantile, prob = 0.75) w.l <- apply(w, 2, quantile, prob = 0.25) studies <- c(ind,c(1,3,4,5,6,8,9,10,11,13,14,17,18,19,20:35)) dat.weights <- data.frame(x = studies, y = w.s, ylo = w.l, yhi = w.u) # Outliers: w.col <- studies %in% ind w.col.plot <- ifelse(w.col, "black", "grey") w.col.plot[c(9,17, 19,27,34,35)] <- "black" w.plot <- function(d){ # d is a data frame with 4 columns # d$x gives variable names # d$y gives center point # d$ylo gives lower limits # d$yhi gives upper limits p <- ggplot(d, aes(x=x, y=y, ymin=ylo, ymax=yhi) )+ geom_pointrange( colour=w.col.plot, lwd =0.8)+ coord_flip() + geom_hline(yintercept = 1, lty=2)+ xlab("Study ID") + ylab("Scale mixture weights") + theme_bw() return(p)} w.plot(dat.weights) #List of other possible statistical models: # 1) Different link functions: logit, cloglog and probit # 2) Different random effects distributions: # "normal" or "sm = scale mixtures". # 3) For the scale mixture random effects: # split.w = TRUE => "split the weights". # 4) For the scale mixture random effects: # df.estimate = TRUE => "estimate the degrees of freedom". # 5) For the scale mixture random effects: # df.estimate = TRUE => "estimate the degrees of freedom". # 6) For the scale mixture random effects: # df = 4 => "fix the degrees of freedom to a particual value". # Note that df = 1 fits a Cauchy bivariate distribution to # the random effects. #End of the examples ## End(Not run)
Meta-Analysis: Evolution of Personality Traits over time
A data frame with 52 studies reporting 18 variables:
First author and publication year.
Country where the study was performed.
Proportion of females in the study.
Instrument used to measure the personality trait.
Whether the study is "newly coded data" or not.
Personality trait measured.
Number of participants at T1.
Number of participants at T2.
Mean age at T1.
Mean age at T2.
Difference in years between T1 and T2.
Mean score at T1.
SD at T1.
Mean score at T2.
SD at T2.
Correlation coefficient between T1 and T2.
Fisher z-transformed correlation.
Standard error of TE.
Bleidorn, Wiebke, et al. (2022). Personality stability and change: A meta-analysis of longitudinal studies. Psychological Bulletin, 148(7-8), 588–619. doi:10.1037/bul0000365
This function plots the treatment effect (TE) against specified covariates or creates a forest plot of treatment effects, arranging up to four plots in a grid.
plot_data( data, formula = ~1, group = NULL, group.colors = NULL, study.label = NULL, x.lab = NULL, y.lab = "TE", title.plot = NULL, errbar.width = 0.25, label.size = 6, forest.color = "blue", forest.shape = 19, forest.size = 3, forest.group = NULL, forest.group.colors = NULL, xlim = NULL, ylim = NULL )plot_data( data, formula = ~1, group = NULL, group.colors = NULL, study.label = NULL, x.lab = NULL, y.lab = "TE", title.plot = NULL, errbar.width = 0.25, label.size = 6, forest.color = "blue", forest.shape = 19, forest.size = 3, forest.group = NULL, forest.group.colors = NULL, xlim = NULL, ylim = NULL )
data |
A data frame with columns 'TE', 'seTE', and the covariates. |
formula |
A one-sided formula (e.g., '~ x1 + x2') for the x-axis variables. If not provided or set to '~1', a forest plot is generated. |
group |
A character string specifying the name of the column in 'data' to use for grouping the points (e.g., by color/fill) in covariate plots. Defaults to 'NULL'. This parameter is ignored for forest plots. |
group.colors |
A character vector specifying colors for the groups when 'group' is used in covariate plots. Can be a named vector where names match the levels of the grouping variable. Defaults to ‘NULL', which uses ggplot2’s default discrete colors. |
study.label |
A character string specifying the name of the column in 'data' that contains the study labels for the forest plot. If 'NULL', default labels ("Study 1", "Study 2", etc.) are created. |
x.lab |
A character vector for x-axis labels. Defaults to variable names. |
y.lab |
Text for the y-axis label. Defaults to "TE" or "Study" for forest plots. |
title.plot |
Text for the plot title. Defaults to 'NULL'. |
errbar.width |
The width of the error bars for covariate plots. Defaults to '0.25'. |
label.size |
A numeric value for the font size of the study labels in the forest plot. Defaults to '6'. |
forest.color |
The color of the points and error bars in a classic (ungrouped) forest plot. Defaults to '"blue"'. |
forest.shape |
The shape of the points in the forest plot. Defaults to '19' (filled circle). |
forest.size |
The size of the points in the forest plot. Defaults to '3'. |
forest.group |
A character string specifying the name of a column in 'data' used to group and color studies in the forest plot ('formula = ~1'). If 'NULL', a single-color forest plot is produced. |
forest.group.colors |
A character vector specifying colors for forest plot groups when 'forest.group' is used. Can be a named vector matching group levels. If 'NULL', colors are assigned automatically: two groups use blue and red; three or more groups use a Brewer palette. |
xlim |
A numeric vector of length 2 specifying x-axis limits. |
ylim |
A numeric vector of length 2 specifying y-axis limits. |
In forest plot mode ('formula = ~1'), studies can optionally be colored by a grouping variable using 'forest.group'.
A 'ggplot' object for a single plot or a 'gridExtra' grob when multiple covariate plots are arranged in a grid.
Generic plot function for b3lmeta object in jarbes.
Generic plot function for b3lmeta object in jarbes.
## S3 method for class 'b3lmeta' plot( x, x.lim = c(-3, 3), y.lim = c(0, 2.7), x.lab = "Treatment Effect: log(OR)", y.lab = "Posterior", title.plot.1 = "Mean Design Components", title.plot.2 = "Three Levels Bayesian Meta-Analysis", ... ) ## S3 method for class 'b3lmeta' plot( x, x.lim = c(-3, 3), y.lim = c(0, 2.7), x.lab = "Treatment Effect: log(OR)", y.lab = "Posterior", title.plot.1 = "Mean Design Components", title.plot.2 = "Three Levels Bayesian Meta-Analysis", ... )## S3 method for class 'b3lmeta' plot( x, x.lim = c(-3, 3), y.lim = c(0, 2.7), x.lab = "Treatment Effect: log(OR)", y.lab = "Posterior", title.plot.1 = "Mean Design Components", title.plot.2 = "Three Levels Bayesian Meta-Analysis", ... ) ## S3 method for class 'b3lmeta' plot( x, x.lim = c(-3, 3), y.lim = c(0, 2.7), x.lab = "Treatment Effect: log(OR)", y.lab = "Posterior", title.plot.1 = "Mean Design Components", title.plot.2 = "Three Levels Bayesian Meta-Analysis", ... )
x |
The object generated by the b3lmeta function. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot.1 |
Text for the posterior means by design. |
title.plot.2 |
Text for the posterior pooled mean. |
... |
... |
This function is built with 'ggplot2'. Parameters such as 'binwidth', 'adjust', 'density.color', 'density.lwd', and 'density.lty' correspond directly to arguments in the 'ggplot2' geoms.
## S3 method for class 'bcbnp' plot( x, plot.type = "predictive", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = NULL, y.lab = "Posterior Predictive Distribution", title.plot = NULL, show.histogram = TRUE, show.rug = NULL, binwidth = 0.08, adjust = 1, density.color = "blue", hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 1, density.alpha = 0.2, density.lwd = 1, density.lty = 1, ... )## S3 method for class 'bcbnp' plot( x, plot.type = "predictive", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = NULL, y.lab = "Posterior Predictive Distribution", title.plot = NULL, show.histogram = TRUE, show.rug = NULL, binwidth = 0.08, adjust = 1, density.color = "blue", hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 1, density.alpha = 0.2, density.lwd = 1, density.lty = 1, ... )
x |
The object generated by the bcbnp function (the BC-BNP model output). |
plot.type |
A character string specifying the type of plot: - "predictive": Plots the posterior predictive distribution of a new study. - "mu_posterior": Plots the posterior of the overall mean (mu.theta). - "tau_posterior": Plots the posterior of the between-study standard deviation (tau.theta). |
n.samples |
The number of posterior samples to plot. If NULL, all samples are used. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the plot. |
show.histogram |
A logical value indicating whether to show the histogram. |
show.rug |
A logical value indicating whether to show the rug plot. Defaults to TRUE for predictive and mu plots, FALSE for tau. |
binwidth |
A numeric value specifying the bin width for the histogram. |
adjust |
A numeric value for the density bandwidth adjustment. |
density.color |
A character value for the density curve color. |
hist.color |
A character value for the histogram border color. |
hist.fill |
A character value for the histogram fill color. |
rug.color |
A character value for the rug plot color. |
rug.alpha |
A numeric value between 0 and 1 for the rug plot transparency. |
density.alpha |
A numeric value for the density curve transparency. |
density.lwd |
A numeric value for the density curve line width. |
density.lty |
A numeric value for the density curve line type. |
... |
... |
This function is built with 'ggplot2'. Parameters such as 'binwidth', 'adjust', 'density.color', 'density.lwd', and 'density.lty' correspond directly to arguments in the 'ggplot2' geoms.
## S3 method for class 'bcbnp_0' plot( x, plot.type = "predictive", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = NULL, y.lab = "Density", title.plot = NULL, show.histogram = TRUE, show.rug = NULL, binwidth = 0.08, adjust = 1, density.color = "blue", hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 1, density.alpha = 0.2, density.lwd = 1, density.lty = 1, ... )## S3 method for class 'bcbnp_0' plot( x, plot.type = "predictive", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = NULL, y.lab = "Density", title.plot = NULL, show.histogram = TRUE, show.rug = NULL, binwidth = 0.08, adjust = 1, density.color = "blue", hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 1, density.alpha = 0.2, density.lwd = 1, density.lty = 1, ... )
x |
The object generated by the bcbnp_0 function (the BC-BNP model output). |
plot.type |
A character string specifying the type of plot: - "predictive": Plots the posterior predictive distribution of a new study (unbiased density vs potentially biased histogram). - "mu_posterior": Plots the posterior of the overall mean (mu.theta). - "tau_posterior": Plots the posterior of the between-study standard deviation (tau.theta). |
n.samples |
The number of posterior samples to plot. If NULL, all samples are used. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the plot. |
show.histogram |
A logical value indicating whether to show the histogram. |
show.rug |
A logical value indicating whether to show the rug plot. Defaults to TRUE for predictive and mu plots, FALSE for tau. |
binwidth |
A numeric value specifying the bin width for the histogram. |
adjust |
A numeric value for the density bandwidth adjustment. |
density.color |
A character value for the density curve color. |
hist.color |
A character value for the histogram border color. |
hist.fill |
A character value for the histogram fill color. |
rug.color |
A character value for the rug plot color. |
rug.alpha |
A numeric value between 0 and 1 for the rug plot transparency. |
density.alpha |
A numeric value for the density curve transparency. |
density.lwd |
A numeric value for the density curve line width. |
density.lty |
A numeric value for the density curve line type. |
... |
... |
Generic plot function for bcdpmeta object in jarbes.
## S3 method for class 'bcdpmeta' plot( x, x.lim = c(-3, 3), y.lim = c(0, 2), x.lab = "Treatment Effect: log(OR)", y.lab = "Posterior", title.plot.1 = "Model Components", title.plot.2 = "Bias Corrected Meta-Analysis", ... )## S3 method for class 'bcdpmeta' plot( x, x.lim = c(-3, 3), y.lim = c(0, 2), x.lab = "Treatment Effect: log(OR)", y.lab = "Posterior", title.plot.1 = "Model Components", title.plot.2 = "Bias Corrected Meta-Analysis", ... )
x |
The object generated by the bcmeta function. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot.1 |
Text for the posterior means by component (biased and bias corrected). |
title.plot.2 |
Text for the posterior mean (pooled and predictive). |
... |
... |
This function is built with 'ggplot2'. Parameters such as 'binwidth', 'adjust', 'density.color', 'density.lwd', 'density.lty', and 'density.alpha' correspond directly to arguments in the 'ggplot2' geoms.
## S3 method for class 'bcmeta' plot( x, plot.type = "predictive_with_bias", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = expression(theta^{ new }), y.lab = "Posterior Predictive Distribution", title.plot = "Bias-Corrected Meta-Analysis", show.histogram = TRUE, show.rug = TRUE, show.legend.lines = FALSE, binwidth = 0.08, adjust = 1, density.color = "blue", density.lty = "solid", density.lwd = 1, density.alpha = 0.2, hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 0.5, predictive.color = "blue", mu.color = "black", bias.color = "red", ... )## S3 method for class 'bcmeta' plot( x, plot.type = "predictive_with_bias", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = expression(theta^{ new }), y.lab = "Posterior Predictive Distribution", title.plot = "Bias-Corrected Meta-Analysis", show.histogram = TRUE, show.rug = TRUE, show.legend.lines = FALSE, binwidth = 0.08, adjust = 1, density.color = "blue", density.lty = "solid", density.lwd = 1, density.alpha = 0.2, hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 0.5, predictive.color = "blue", mu.color = "black", bias.color = "red", ... )
x |
The object generated by the bcmeta function. |
plot.type |
A character string specifying the type of plot: "predictive_with_bias" (default), "predictive", "tau_posterior". |
n.samples |
The number of posterior samples to plot. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. Defaults to |
y.lab |
Text with the label of the y-axis. Defaults to "Posterior Predictive Distribution". |
title.plot |
Text for setting a title in the plot. Defaults to "Bias-Corrected Meta-Analysis". |
show.histogram |
A logical value indicating whether to show the histogram. |
show.rug |
A logical value indicating whether to show the rug plot. |
show.legend.lines |
A logical value indicating whether to show the legend for the density curves in the "predictive_with_bias" plot. |
binwidth |
A numeric value specifying the bin width for the histogram. |
adjust |
A numeric value to adjust the bandwidth of the density curves. |
density.color |
A character value for the density curve color (used for non-comparison plots). |
density.lty |
A character value for the density curve line type. |
density.lwd |
A numeric value for the density curve line width. |
density.alpha |
A numeric value between 0 and 1 for the density curve transparency. |
hist.color |
A character value for the histogram border color. |
hist.fill |
A character value for the histogram fill color. |
rug.color |
A character value for the rug plot color. |
rug.alpha |
A numeric value between 0 and 1 for the rug plot transparency. |
predictive.color |
A character value specifying the color of the posterior predictive density curve in "predictive_with_bias". |
mu.color |
A character value specifying the color of the posterior mean density curve in "predictive_with_bias". |
bias.color |
A character value specifying the color of the bias-inflated mean density curve in "predictive_with_bias". |
... |
... |
This function is built with 'ggplot2'. Parameters such as 'binwidth', 'adjust', 'density.color', 'density.lwd', and 'density.lty' correspond directly to arguments in the 'ggplot2' geoms.
## S3 method for class 'bcmixmeta' plot( x, plot.type = "predictive_with_bias", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = NULL, y.lab = "Posterior Predictive Distribution", title.plot = NULL, show.histogram = TRUE, show.rug = TRUE, show.legend = FALSE, binwidth = 0.08, adjust = 1, predictive.color = "blue", mu.color = "black", bias.color = "red", hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 1, density.alpha = 0.4, density.lwd = 1, density.lty = 1, ... )## S3 method for class 'bcmixmeta' plot( x, plot.type = "predictive_with_bias", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = NULL, y.lab = "Posterior Predictive Distribution", title.plot = NULL, show.histogram = TRUE, show.rug = TRUE, show.legend = FALSE, binwidth = 0.08, adjust = 1, predictive.color = "blue", mu.color = "black", bias.color = "red", hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 1, density.alpha = 0.4, density.lwd = 1, density.lty = 1, ... )
x |
The object generated by the bcmixmeta function (the BC-BNP model output). |
plot.type |
A character string specifying the type of plot: "predictive_with_bias" (default), "predictive", "mu_posterior", "tau_posterior". |
n.samples |
The number of posterior samples to plot. If NULL, all posterior samples are used. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the plot. |
show.histogram |
A logical value indicating whether to show the histogram. |
show.rug |
A logical value indicating whether to show the rug plot. |
show.legend |
A logical value indicating whether to display the legend. |
binwidth |
A numeric value specifying the bin width for the histogram. |
adjust |
A numeric value to adjust the bandwidth of the density curves. |
predictive.color |
A character value specifying the color of the posterior predictive density curve. |
mu.color |
A character value specifying the color of the posterior mean density curve. |
bias.color |
A character value specifying the color of the bias-adjusted mean density curve. |
hist.color |
A character value for the histogram border color. |
hist.fill |
A character value for the histogram fill color. |
rug.color |
A character value for the rug plot color. |
rug.alpha |
A numeric value between 0 and 1 specifying the rug plot transparency. |
density.alpha |
A numeric value between 0 and 1 specifying density transparency. |
density.lwd |
A numeric value specifying density line width. |
density.lty |
A numeric value specifying density line type. |
... |
... |
This function is built with 'ggplot2'. Parameters such as 'binwidth', 'adjust', 'density.colors', 'density.lwd', 'density.lty', and 'density.alpha' correspond directly to arguments in the 'ggplot2' geoms.
## S3 method for class 'bmeta' plot( x, n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = expression(mu[theta]), y.lab = "Posterior Distribution", title.plot = NULL, show.legend = TRUE, legend.labels = c("Posterior of the difference in means", "Posterior Predictive Distribution"), legend.title = "Distribution", show.histogram = TRUE, show.rug = TRUE, show.vlines = TRUE, binwidth = 0.08, adjust = 1, density.colors = c("black", "blue"), density.lwd = c(1, 1), density.lty = c("solid", "dashed"), density.alpha = c(0.2, 0.2), hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 0.5, ... )## S3 method for class 'bmeta' plot( x, n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = expression(mu[theta]), y.lab = "Posterior Distribution", title.plot = NULL, show.legend = TRUE, legend.labels = c("Posterior of the difference in means", "Posterior Predictive Distribution"), legend.title = "Distribution", show.histogram = TRUE, show.rug = TRUE, show.vlines = TRUE, binwidth = 0.08, adjust = 1, density.colors = c("black", "blue"), density.lwd = c(1, 1), density.lty = c("solid", "dashed"), density.alpha = c(0.2, 0.2), hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 0.5, ... )
x |
The object generated by the bmeta function. |
n.samples |
The number of posterior samples to plot. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the plot. |
show.legend |
A logical value indicating whether to show the legend. |
legend.labels |
A character vector of length 2 to customize the legend labels. |
legend.title |
A character value to customize the legend title. |
show.histogram |
A logical value indicating whether to show the histogram. |
show.rug |
A logical value indicating whether to show the rug plot. |
show.vlines |
A logical value indicating whether to show the vertical lines for the means. |
binwidth |
A numeric value specifying the bin width for the histogram. |
adjust |
A numeric value to adjust the bandwidth of the density curves. Defaults to 1. |
density.colors |
A character vector of length 2 for the density curve colors. |
density.lwd |
A numeric vector of length 2 for the density curve line widths. |
density.lty |
A numeric vector of length 2 for the density curve line types. |
density.alpha |
A numeric vector of length 2 for the density curve transparencies. |
hist.color |
A character value for the histogram border color. |
hist.fill |
A character value for the histogram fill color. |
rug.color |
A character value for the rug plot color. |
rug.alpha |
A numeric value between 0 and 1 for the rug plot transparency. |
... |
... |
This function is built with 'ggplot2'. Parameters such as 'binwidth', 'adjust', 'density.color', 'density.lwd', 'density.lty', and 'density.alpha' correspond directly to arguments in the 'ggplot2' geoms.
## S3 method for class 'dpmeta' plot( x, plot.type = "predictive_vs_mean", center = "median", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = expression(theta^{ new }), y.lab = "Posterior Predictive Distribution", title.plot = "Dirichlet Process ", show.histogram = TRUE, show.rug = TRUE, show.legend = FALSE, binwidth = 0.08, adjust = 1, predictive.color = "blue", mean.color = "red", median.color = "black", density.lty = "solid", density.lwd = 1, density.alpha = 0.2, hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 0.5, ... )## S3 method for class 'dpmeta' plot( x, plot.type = "predictive_vs_mean", center = "median", n.samples = NULL, x.lim = NULL, y.lim = NULL, x.lab = expression(theta^{ new }), y.lab = "Posterior Predictive Distribution", title.plot = "Dirichlet Process ", show.histogram = TRUE, show.rug = TRUE, show.legend = FALSE, binwidth = 0.08, adjust = 1, predictive.color = "blue", mean.color = "red", median.color = "black", density.lty = "solid", density.lwd = 1, density.alpha = 0.2, hist.color = "black", hist.fill = "grey95", rug.color = "green", rug.alpha = 0.5, ... )
x |
The object generated by the dpmeta function. |
plot.type |
A character string specifying the type of plot: "predictive_vs_mean" (default), "predictive", "tau_posterior". |
center |
A character string specifying which central tendency of the DP to plot: "median" (default), "mean", "both". |
n.samples |
The number of posterior samples to plot. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. Defaults to |
y.lab |
Text with the label of the y-axis. Defaults to "Posterior Predictive Distribution". |
title.plot |
Text for setting a title in the plot. Defaults to "Dirichlet Process ". |
show.histogram |
A logical value indicating whether to show the histogram. |
show.rug |
A logical value indicating whether to show the rug plot. |
show.legend |
A logical value indicating whether to show the legend when multiple density curves are displayed. |
binwidth |
A numeric value specifying the bin width for the histogram. Defaults to 0.08. |
adjust |
A numeric value to adjust the bandwidth of the density curves. Defaults to 1. |
predictive.color |
A character value specifying the color of the posterior predictive density curve. |
mean.color |
A character value specifying the color of the posterior mean density curve. |
median.color |
A character value specifying the color of the posterior median density curve. |
density.lty |
A character value for the density curve line type. Defaults to "solid". |
density.lwd |
A numeric value for the density curve line width. Defaults to 1. |
density.alpha |
A numeric value between 0 and 1 for the density curve transparency. Defaults to 0.2. |
hist.color |
A character value for the histogram border color. Defaults to "black". |
hist.fill |
A character value for the histogram fill color. Defaults to "grey95". |
rug.color |
A character value for the rug plot color. Defaults to "green". |
rug.alpha |
A numeric value between 0 and 1 for the rug plot transparency. Defaults to 0.5. |
... |
... |
Generic plot function for bmeta object in jarbes.
## S3 method for class 'dpmmeta' plot( x, x.lim = c(-3, 3), y.lim = c(0, 2), x.lab = "Treatment Effect: log(OR)", y.lab = "Posterior", title.plot = "Simple Bayesian Meta-Analysis", ... )## S3 method for class 'dpmmeta' plot( x, x.lim = c(-3, 3), y.lim = c(0, 2), x.lab = "Treatment Effect: log(OR)", y.lab = "Posterior", title.plot = "Simple Bayesian Meta-Analysis", ... )
x |
The object generated by the bmeta function. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the plot. |
... |
... |
Generic plot function for hmr object in jarbes.
## S3 method for class 'hmr' plot( x, x.lim = c(-5, 2.8), y.lim = c(-2, 1), x.lab = "Event rate of The Control Group (logit scale)", y.lab = "No improvement <- Effectiveness -> Improvement", title.plot = "HMR: Effectiveness Against Baseline Risk", AD.colour = "red", IPD.colour = "blue", Study.Types = c("AD-RCTs", "IPD-RWD"), ... )## S3 method for class 'hmr' plot( x, x.lim = c(-5, 2.8), y.lim = c(-2, 1), x.lab = "Event rate of The Control Group (logit scale)", y.lab = "No improvement <- Effectiveness -> Improvement", title.plot = "HMR: Effectiveness Against Baseline Risk", AD.colour = "red", IPD.colour = "blue", Study.Types = c("AD-RCTs", "IPD-RWD"), ... )
x |
The object generated by the hmr function. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the plot. |
AD.colour |
Colour of the location of the baseline risk of the aggregated data AD |
IPD.colour |
Colour of the location of the baseline risk of the individual participant data (IPD) data |
Study.Types |
Vector of text for the label of the study types |
... |
... |
Generic plot function for metarisk object in jarbes.
## S3 method for class 'metarisk' plot( x, x.lim = c(-5, 2.8), y.lim = c(-2, 1), x.lab = "Rate of The Control Group (logit scale)", y.lab = "No improvement <- Treatment effect -> Improvement", title.plot = "Treatment Effect Against Baseline Risk", ... )## S3 method for class 'metarisk' plot( x, x.lim = c(-5, 2.8), y.lim = c(-2, 1), x.lab = "Rate of The Control Group (logit scale)", y.lab = "No improvement <- Treatment effect -> Improvement", title.plot = "Treatment Effect Against Baseline Risk", ... )
x |
The object generated by the metarisk function. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
y.lim |
Numeric vector of length 2 specifying the y-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for setting a title in the plot. |
... |
... |
Generates a forest plot of the simulated meta-analysis dataset, showing the observed effect sizes (TE) with 95
x |
A 'simData' object created by 'simData()'. |
x.lim |
Numeric vector of length 2 specifying the x-axis limits. |
x.lab |
Text with the label of the x-axis. |
y.lab |
Text with the label of the y-axis. |
title.plot |
Text for the title of the plot. |
bias_colors |
Named character vector specifying colors for bias categories. |
bias_legend_title |
Text label for the bias legend. |
ref_line_color |
Color for the vertical reference line corresponding to the mean. |
... |
Additional arguments (currently not used). |
This function visualizes the results of a bias-corrected Bayesian nonparametric meta-regression. It plots the raw data with error bars, colors points based on the posterior probability of bias (I > 0.5), and adds the posterior mean regression line, the credible interval for the true effects, and the prediction interval for new observations, including its median line.
plotdata_reg.bcbnp( object, covariate, title.plot = NULL, ci.color = "green", pi.color = "purple", mean.line.color = "magenta", pi.mean.line.color = "gray", point.color.unbiased = "blue", point.color.biased = "red", show_ci = TRUE, show_pi = TRUE, errorbar_width = 0.25, x.lab = covariate, y.lab = "Treatment Effect (TE)", legend.name = "Posterior Bias", size.legend.name = "1/seTE", label.unbiased = "Unbiased", label.biased = "Biased" )plotdata_reg.bcbnp( object, covariate, title.plot = NULL, ci.color = "green", pi.color = "purple", mean.line.color = "magenta", pi.mean.line.color = "gray", point.color.unbiased = "blue", point.color.biased = "red", show_ci = TRUE, show_pi = TRUE, errorbar_width = 0.25, x.lab = covariate, y.lab = "Treatment Effect (TE)", legend.name = "Posterior Bias", size.legend.name = "1/seTE", label.unbiased = "Unbiased", label.biased = "Biased" )
object |
The output object from the bcbnp function. |
covariate |
A character string specifying the single covariate from the data to be plotted (e.g., '"baseline_va"'). |
title.plot |
The title for the plot. |
ci.color |
The color of the credible interval lines. Defaults to "green". |
pi.color |
The color of the prediction interval lines. Defaults to "purple". |
mean.line.color |
The color of the mean regression line. Defaults to "magenta". |
pi.mean.line.color |
The color of the prediction interval median line. Defaults to "gray". |
point.color.unbiased |
The color of unbiased points. Defaults to "blue". |
point.color.biased |
The color of biased points. Defaults to "red". |
show_ci |
A logical value indicating whether to show the credible interval. Defaults to 'TRUE'. |
show_pi |
A logical value indicating whether to show the prediction interval. Defaults to 'TRUE'. |
errorbar_width |
The width of the error bars. Defaults to '0.25'. |
x.lab |
A character string for the x-axis label. Defaults to the covariate name. |
y.lab |
A character string for the y-axis label. Defaults to "Treatment Effect (TE)". |
legend.name |
A character string for the color legend title. Defaults to "Posterior Bias". |
size.legend.name |
A character string for the size legend title. Defaults to "1/seTE". |
label.unbiased |
A character string for the label of the unbiased group. Defaults to "Unbiased". |
label.biased |
A character string for the label of the biased group. Defaults to "Biased". |
A ggplot object.
PPV23 (23-valent pneumococcal polysaccharide vaccine) with 16 Randomized Clinical Trials (RCTs); outcome variable CAP (community-acquired pneumonia).
This data frame corresponds to 16 randomized control trials (RCTs) reporting efficacy of the PPV (Pneumococcal Polysaccharide) vaccine in preventing CAP (community acquired pneumonia). The data frame contains the evaluation of Risk of Bias (RoB) of the trials and some study population characteristics.
A matrix with 16 rows and 18 columns. Each row represents study results, the columns are:
Name of the first author and year.
Year of publication.
Number of infections in the intervention group.
Number of patients in the intervention group.
Number of infections in the control group.
Number of patients in the control group.
Treatment Effect as Log Odds Ratio.
Standard Error of the TE.
Observed baseline rate in logit scale.
Total sample size.
Description of the study design.
Type of vaccine used for itervention.
0 = PPV23; 1 = PPV-Other.
Indicates low income patients population with 0 = no; 1 = yes.
Random sequence generation (selection bias: low;high;unclear.
Allocation concealment (selection bias): low;high;unclear.
Confounding: low;high;unclear.
Blinding of participants and personnel (performace bias): low;high;unclear.
Blinding of outcome assessment (detection bias): low;high;unclear.
Incomplete outcome data (attrition bias): low;high;unclear.
Selective reporting (reporting bias): low;high;unclear.
Comments on patients characteristics.
The data were obtainded from: Moberley et al. (2013).
Moberley, S., Holden, J., Tatham, D., and Andrews, R. (2013), Vaccines for preventing pneumococcal infection in adults., Cochrane Database of Systematic Reviews, Issue 1. Art. No.: CD000422. DOI:10.1002/14651858.CD000422.pub3.
Verde, P.E. and Curcio, D. (2017) Hierarchical Meta-Regression Modelling: The Case of The Pneumococcal Polysaccharide Vaccine. Technical Report.
PPV23 (23-valent pneumococcal polysaccharide vaccine) with 3 Randomized Clinical Trials; 5 Cohort Studies and 3 Case-Control Studies.
The outcome variable IPD (Invasive Pneumococcal Disease).
A matrix with 11 rows and 6 columns. Each row represents study results, the columns are:
Name of the first author and year.
Treatment Effect as Log Odds Ratio.
Standard Error of the TE.
Number of patients in the vaccination group.
Number of patients in the control group.
Description of the study design.
The data were obtainded from: Falkenhorst et al. (2017).
Falkenhorst, G., Remschmidt, C., Harder, T., Hummers-Pradier, E., Wichmann, O., and Bogdan, C. (2017) Effectiveness of the 23-Valent Pneumococcal Polysaccharide Vaccine(PPV23) against Pneumococcal Disease in the Elderly: Systematic Review and Meta-Analysis. PLoS ONE 12(1): e0169368. doi:10.1371/journal.pone.0169368.
Verde, P.E. and Curcio, D. (2017) Hierarchical Meta-Regression Modelling: The Case of The Pneumococcal Polysaccharide Vaccine. Technical Report.
This dataset contains study-level data extracted from the systematic review and meta-analysis Trends Over Time in Cognitive Outcomes of Children Born Very Preterm by Behboodi et al. (JAMA Pediatrics, 2025). The review synthesizes evidence from observational cohort and matched studies comparing cognitive outcomes of children born very preterm (VPT) or extremely preterm (EPT) with children born at full term (FT).
A data frame with 61 rows and 18 columns. Each row represents a single study included in the meta-analysis. The columns include:
First author and publication year.
Number of children born extremely or very preterm.
Mean cognitive score in the EPT/VPT group.
Standard deviation of cognitive scores in the EPT/VPT group.
Number of children born full term.
Mean cognitive score in the full-term group.
Standard deviation of cognitive scores in the full-term group.
Standardized mean difference (Hedges’ g) comparing EPT/VPT with FT.
Standard error of the standardized mean difference.
Mean age at cognitive assessment.
Mean gestational age of the study population.
Mean birth weight of the study population.
Median year of birth of the cohort included in the study.
Methodological quality score based on a modified Newcastle–Ottawa Scale, ranging from 0 to 7, with higher values indicating better study quality.
Indicator of whether the study used a matched design to compare preterm and full-term participants ("yes" or "no").
Classification of the preterm subgroup included in the comparison: VPT for very preterm only, EPT for extremely preterm only, and VPT_and_EPT for combined very and extremely preterm groups.
Country where the study was conducted.
Indicator of whether the study contributed data to the primary analysis, secondary analysis, or both, as defined in Behboodi et al.
The standardized mean difference (SMD) is a measure of the difference between two group means, expressed in units of their pooled standard deviation. In this dataset it quantifies the difference in mean cognitive test scores between children born preterm (EPT/VPT) and those born full term (FT), with negative values indicating lower scores in the preterm group.
The SMD is calculated as Hedges’ g. First, Cohen’s d is computed as
where and are the mean cognitive scores in the EPT/VPT and
FT groups, respectively, and is the pooled standard deviation.
The pooled standard deviation is given by
Here, and are the group sample sizes, and
and are the corresponding standard deviations.
Cohen’s d is multiplied by the small-sample correction factor
to obtain Hedges’ g:
The standard error of the standardized mean difference (seSMD) measures the uncertainty of the estimated SMD. Smaller values indicate more precise estimates of the difference between the preterm (EPT/VPT) and full-term (FT) groups.
The seSMD is calculated as
Behboodi S, Chaimani A, Benhammou V, Twilhaar ES, Johnson S, Zeitlin J, Sentenac M. Trends Over Time in Cognitive Outcomes of Children Born Very Preterm: A Systematic Review and Meta-Analysis. JAMA Pediatrics. 2025;179(10):1074–1081. doi:10.1001/jamapediatrics.2025.2221.
Generic print function for b3lmeta object in jarbes.
## S3 method for class 'b3lmeta' print(x, digits, ...)## S3 method for class 'b3lmeta' print(x, digits, ...)
x |
The object generated by the function b3lmeta. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for bcbnp object in jarbes.
## S3 method for class 'bcbnp_0' print(x, digits, ...)## S3 method for class 'bcbnp_0' print(x, digits, ...)
x |
The object generated by the function bcbnp. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for bcdpmeta object in jarbes.
## S3 method for class 'bcdpmeta' print(x, digits, ...)## S3 method for class 'bcdpmeta' print(x, digits, ...)
x |
The object generated by the function bcdpmeta. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for hmr object in jarbes.
## S3 method for class 'bchmr' print(x, digits = 3, intervals = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)## S3 method for class 'bchmr' print(x, digits = 3, intervals = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)
x |
The object generated by the function bchmr. |
digits |
The number of significant digits printed. The default value is 3. |
intervals |
A numeric vector of probabilities with values in [0,1]. The default value is intervals = c(0.025, 0.5, 0.975). |
... |
... |
Generic print function for bcmeta object in jarbes.
## S3 method for class 'bcmeta' print(x, digits, ...)## S3 method for class 'bcmeta' print(x, digits, ...)
x |
The object generated by the function bcmeta. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for bcmixmeta object in jarbes.
## S3 method for class 'bcmixmeta' print(x, digits, ...)## S3 method for class 'bcmixmeta' print(x, digits, ...)
x |
The object generated by the function bcmixmeta. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for dpmeta object in jarbes.
## S3 method for class 'dpmeta' print(x, digits, ...)## S3 method for class 'dpmeta' print(x, digits, ...)
x |
The object generated by the function dpmeta. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for dpmeta object in jarbes.
## S3 method for class 'dpmetareg' print(x, digits, ...)## S3 method for class 'dpmetareg' print(x, digits, ...)
x |
The object generated by the function dpmmeta. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for dpmmeta object in jarbes.
## S3 method for class 'dpmmeta' print(x, digits, ...)## S3 method for class 'dpmmeta' print(x, digits, ...)
x |
The object generated by the function dpmmeta. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for hmr object in jarbes.
## S3 method for class 'hmr' print(x, digits = 3, intervals = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)## S3 method for class 'hmr' print(x, digits = 3, intervals = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)
x |
The object generated by the function hmr. |
digits |
The number of significant digits printed. The default value is 3. |
intervals |
A numeric vector of probabilities with values in [0,1]. The default value is intervals = c(0.025, 0.5, 0.975). |
... |
... |
Generic print function for metarisk object in jarbes.
## S3 method for class 'metarisk' print(x, digits, ...)## S3 method for class 'metarisk' print(x, digits, ...)
x |
The object generated by the function metarisk. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic print function for simData object.
## S3 method for class 'simData' print(x, ...)## S3 method for class 'simData' print(x, ...)
x |
An object of class |
... |
Additional arguments passed to |
This function simulates aggregated data for a meta-analysis, introducing biased studies at different levels.
simData( mu, sigma, n.total, tau, N, mu.beta.1, mu.beta.2, mu.beta.3, n.B.1, n.B.2, n.B.3 )simData( mu, sigma, n.total, tau, N, mu.beta.1, mu.beta.2, mu.beta.3, n.B.1, n.B.2, n.B.3 )
mu |
Scalar with the true pooled effect value. |
sigma |
Scalar with the true intra-study standard deviation. |
n.total |
A vector with the sample sizes of the studies. |
tau |
Scalar with the between-studies standard deviation. |
N |
Scalar with the total number of studies in the meta-analysis. |
mu.beta.1 |
Scalar with the mean bias of studies in the mild bias class. |
mu.beta.2 |
Scalar with the mean bias of studies in the large bias class. |
mu.beta.3 |
Scalar with the mean bias of studies in the extreme bias class. |
n.B.1 |
Scalar with the number of studies in the mild bias class. |
n.B.2 |
Scalar with the number of studies in the large bias class. |
n.B.3 |
Scalar with the number of studies in the extreme bias class. |
A dataframe with columns:
TE |
Observed study's effect. |
seTE |
Standard error of the study's effect. |
theta |
True study's effect. |
n.total |
Sample size of the study. |
B.flag |
Bias category: "No B", "Mild B", "Large B", "Extreme B". |
set.seed(123) simData(mu = 0, sigma = 1, n.total = rep(100, 10), tau = 0.5, N = 10, mu.beta.1 = 0.2, mu.beta.2 = 0.5, mu.beta.3 = 1, n.B.1 = 2, n.B.2 = 2, n.B.3 = 2)set.seed(123) simData(mu = 0, sigma = 1, n.total = rep(100, 10), tau = 0.5, N = 10, mu.beta.1 = 0.2, mu.beta.2 = 0.5, mu.beta.3 = 1, n.B.1 = 2, n.B.2 = 2, n.B.3 = 2)
Meta-analysis of 31 randomized controled trials (RCTs) of two treatment groups of heart disease patients, where the treatment group received bone marrow stem cells and the control group a placebo treatment.
A matrix with 31 rows and 11 columns. Each row represents study results, the columns are:
ID name of the trial.
effect.size= treatment effect is measured as the difference of the ejection fraction between groups, which measures the improvement of left ventricular function in the heart.
Standard Error of the effect.size.
Total number of patients in the trial.
Number of detected discrepancies in the published trial. Discrepancies are defined as two or more reported facts that cannot both be true because they are logically or mathematically incompatible.
Bias arising from the randomization process.
Bias due to deviations from intended interventions.
Bias introduced by lack of blinding.
Bias in measurement of the outcome.
Bias in selection of the reported result.
Selection bias, performance bias, detection bias, attrition bias, etc.
Nowbar, A N, et al. (2014) Discrepancies in autologous bone marrow stem cell trials and enhancement of ejection fraction (DAMASCENE): weighted regression and meta-analysis. BMJ, 348,1-9.
Verde, P. E. (2017) Two Examples of Bayesian Evidence Synthesis with the Hierarchical Meta-Regression Approach. Chap.9, pag 189-206. Bayesian Inference, ed. Tejedor, Javier Prieto. InTech.
Generic summary function for bmeta object in jarbes
## S3 method for class 'b3lmeta' summary(object, digits = 3, ...)## S3 method for class 'b3lmeta' summary(object, digits = 3, ...)
object |
The object generated by the bmeta function. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic summary function for bcbnp object in jarbes.
## S3 method for class 'bcbnp' summary(object, digits = 3, show.clustering = FALSE, show.neff = FALSE, ...)## S3 method for class 'bcbnp' summary(object, digits = 3, show.clustering = FALSE, show.neff = FALSE, ...)
object |
The object generated by the bcbnp function. |
digits |
The number of significant digits printed. The default value is 3. |
show.clustering |
A logical value indicating whether to show the clustering parameters table. Defaults to 'TRUE'. |
show.neff |
A logical value indicating whether to show the effective sample size column (n.eff) and Rhat. Defaults to 'TRUE'. |
... |
... |
Generic summary function for bcbnp_0 object in jarbes.
## S3 method for class 'bcbnp_0' summary(object, digits = 3, show.clustering = FALSE, show.neff = FALSE, ...)## S3 method for class 'bcbnp_0' summary(object, digits = 3, show.clustering = FALSE, show.neff = FALSE, ...)
object |
The object generated by the bcbnp function. |
digits |
The number of significant digits printed. The default value is 3. |
show.clustering |
A logical value indicating whether to show the clustering parameters table. Defaults to 'TRUE'. |
show.neff |
A logical value indicating whether to show the effective sample size column (n.eff) and Rhat. Defaults to 'TRUE'. |
... |
... |
Generic summary function for bcdpmeta object in jarbes
## S3 method for class 'bcdpmeta' summary(object, digits = 3, ...)## S3 method for class 'bcdpmeta' summary(object, digits = 3, ...)
object |
The object generated by the bcmeta function. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic summary function for bcmeta object.
## S3 method for class 'bcmeta' summary(object, digits = 3, show.neff = FALSE, ...)## S3 method for class 'bcmeta' summary(object, digits = 3, show.neff = FALSE, ...)
object |
The object generated by the bcmeta function. |
digits |
The number of significant digits printed. The default value is 3. |
show.neff |
A logical value indicating whether to show the effective sample size column (n.eff) and Rhat. Defaults to 'FALSE'. |
... |
... |
Generic summary function for bcmixmeta object in jarbes.
## S3 method for class 'bcmixmeta' summary(object, digits = 3, show.clustering = FALSE, show.neff = FALSE, ...)## S3 method for class 'bcmixmeta' summary(object, digits = 3, show.clustering = FALSE, show.neff = FALSE, ...)
object |
The object generated by the bcmixmeta function. |
digits |
The number of significant digits printed. The default value is 3. |
show.clustering |
A logical value indicating whether to show the clustering parameters table. Defaults to 'TRUE'. |
show.neff |
A logical value indicating whether to show the effective sample size column (n.eff) and Rhat. Defaults to 'TRUE'. |
... |
... |
Generic summary function for bmeta object in jarbes
## S3 method for class 'bmeta' summary(object, digits = 3, show.neff = FALSE, ...)## S3 method for class 'bmeta' summary(object, digits = 3, show.neff = FALSE, ...)
object |
The object generated by the bmeta function. |
digits |
The number of significant digits printed. The default value is 3. |
show.neff |
A logical value indicating whether to show the effective sample size column (n.eff) and Rhat. Defaults to 'FALSE'. |
... |
... |
Generic summary function for dpmeta object in jarbes.
## S3 method for class 'dpmeta' summary( object, digits = 3, show.clustering = TRUE, show.neff = FALSE, max.clusters = 10, ... )## S3 method for class 'dpmeta' summary( object, digits = 3, show.clustering = TRUE, show.neff = FALSE, max.clusters = 10, ... )
object |
The object generated by the dpmeta function. |
digits |
The number of significant digits printed. The default value is 3. |
show.clustering |
A logical value indicating whether to show the clustering parameters table. Defaults to 'TRUE'. |
show.neff |
A logical value indicating whether to show the effective sample size column (n.eff) and Rhat. Defaults to 'TRUE'. |
max.clusters |
Maximum number of clusters printed in the clustering table. Default is 10. |
... |
... |
Generic summary function for dpmmeta object in jarbes
## S3 method for class 'dpmmeta' summary(object, digits = 3, ...)## S3 method for class 'dpmmeta' summary(object, digits = 3, ...)
object |
The object generated by the dmpmeta function. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic summary function for hmr object in jarbes
## S3 method for class 'hmr' summary(object, digits = 3, ...)## S3 method for class 'hmr' summary(object, digits = 3, ...)
object |
The object generated by the hmr function. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Generic summary function for metarisk object in jarbes
## S3 method for class 'metarisk' summary(object, digits = 3, ...)## S3 method for class 'metarisk' summary(object, digits = 3, ...)
object |
The object generated by the metarisk function. |
digits |
The number of significant digits printed. The default value is 3. |
... |
... |
Provides a summary of the simulated meta-analysis dataset using the known simulation parameters.
## S3 method for class 'simData' summary(object, digits = 3, ...)## S3 method for class 'simData' summary(object, digits = 3, ...)
object |
A simData object created by simData(). |
digits |
The number of significant digits printed. The default value is 3. |
... |
Additional arguments (currently not used). |
A formatted summary of the meta-analysis simulation.
Meta-analysis of 22 Observational Studies from PubMed, Cochrane Library and SciELO databases that assessed the relationship of a positive ICPC (Isolated Choroid Plexus Cyst) on Trisomy 21
A dataframe with 22 rows and 6 columns. Each row represents study results, the columns are:
Year of publication.
Principal author of the publication.
Number of cases of ICPC with Trisomy 21.
Total number o cases with ICPC.
Mean gestational time in weeks.
Study design: prospective or retrospective cohort.
Kürten C, Knippel A, Verde P, Kozlowski P. A Bayesian risk analysis for Trisomy 21 in isolated choroid plexus cyst: combining a prenatal database with a meta-analysis. J Matern Fetal Neonatal Med. 2019 Jun 11:1-9. doi: 10.1080/14767058.2019.1622666. Epub ahead of print. PMID: 31113245.
Mortality data from the tigecycline meta-analysis (Curcio & Verde, 2011)
A data frame with 15 randomized clinical trials and 5 variables:
Character string identifying the study.
Number of deaths in the tigecycline treatment group.
Total number of patients in the tigecycline group.
Number of deaths in the comparator treatment group.
Total number of patients in the comparator group.
Relative risk calculated using the 0.5 correction when event is 0.
Treatment effect as log(RR).
Standard error of the TE.
The dataset is typically analyzed using the **log relative risk**
where
and the approximate sampling variance
The data were used to illustrate how **profile likelihood methods can evaluate the support for different values of the between-study heterogeneity parameter** in a random-effects meta-analysis.
Yahav D., Lador A., Paul M., Leibovici L. (2011). Efficacy and safety of tigecycline: a systematic review and meta-analysis. Journal of Antimicrobial Chemotherapy, 66:1963–1971.
Curcio D., Verde P.E. (2011). Comment on: Efficacy and safety of tigecycline: a systematic review and meta-analysis. Journal of Antimicrobial Chemotherapy.
data(tyge_2011) # compute log relative risks TE <- log((tyge_2011$event_e / tyge_2011$n_e) / (tyge_2011$event_c / tyge_2011$n_c)) seTE <- sqrt( 1 / tyge_2011$event_e - 1 / tyge_2011$n_e + 1 / tyge_2011$event_c - 1 / tyge_2011$n_c ) head(data.frame(TE, seTE))data(tyge_2011) # compute log relative risks TE <- log((tyge_2011$event_e / tyge_2011$n_e) / (tyge_2011$event_c / tyge_2011$n_c)) seTE <- sqrt( 1 / tyge_2011$event_e - 1 / tyge_2011$n_e + 1 / tyge_2011$event_c - 1 / tyge_2011$n_c ) head(data.frame(TE, seTE))