Create a Meta-Analysis Object Using Data From Previous Studies
Create a Meta-Analysis Object Using Data From Previous Studies
PosteriorATE
Draws from the posterior distribution of the average treatment effect.
checks
MCMC diagnostics
CredibleInterval
Lower and upper bounds of the credible interval
PointEstimate
Point estimate of the average treatment effect
fitted
Stan fit object
new()
Create a new meta analysis object.
metaAnalysis$new(
data,
point_estimates,
standard_errors,
id,
mean_mu = 0,
sd_mu = 0.05,
ci_width = 0.75,
X = NULL,
run_estimation = 1,
...
)
data
Data frame with data point estimates and standard errors from studies.
point_estimates
Name of the variable in the data frame that contains the point estimates.
standard_errors
Name of the variable in the data frame that contains the standard errors of the point estimates.
id
Name of the variable in the data frame that contains the id of the studies.
mean_mu
Prior mean for the true lift in the population.
sd_mu
Prior mean for the standard deviation of the true lift in the population.
ci_width
Credible interval's width.
X
Covariates matrix.
run_estimation
Integer flag to control whether estimation is run (1) or not (0).
...
other arguments passed to rstan::sampling()
A new meta_analysis
object.
PlotRawData()
Plots the raw data.
metaAnalysis$PlotRawData()
A plot with point estimates and 95% confidence intervals.
PlotLift()
Plots lift's prior and posterior distributions.
For more details see vizdraws::vizdraws()
.
metaAnalysis$PlotLift(...)
...
other arguments passed to vizdraws.
An interactive plot of the prior and posterior distributions.
UpdateCI()
Update the width of the credible interval.
metaAnalysis$UpdateCI(ci_width)
ci_width
New width for the credible interval. This number in the (0,1) interval.
probability()
Calculates that probability that lift is between a and b.
metaAnalysis$probability(a = -Inf, b = Inf, percent = TRUE)
a
Lower bound. By default -Inf.
b
Upper bound. By default Inf.
percent
A logical that indicates that a and b should be converted to percentage.
A string with the probability.
findings()
Calculates the point estimate a credible interval for the meta analysis.
metaAnalysis$findings(percent = TRUE)
percent
A logical that indicates that the point estimate should be converted to percent.
A string with the findings
clone()
The objects of this class are cloneable with this method.
metaAnalysis$clone(deep = FALSE)
deep
Whether to make a deep clone.
A meta analysis has raw data and draws from the lift's posterior distribution. This is represented by an R6 Class.