View source: R/create_tipmap_data.R
create_tipmap_data | R Documentation |
Combines new trial data created by createTargetData()
, a posterior distribution created by create_posterior_data()
and a
robust MAP prior using RBesT::automixfit()
and an optional meta-analysis, e.g. created using the meta
package, into a data frame
needed for the functions tipmap_plot()
and get_tipping_point()
.
create_tipmap_data(new_trial_data, posterior, map_prior, meta_analysis = NULL)
new_trial_data |
A data frame containing data on the new trial in the target population. See |
posterior |
A mixture combining MAP prior and target population. See |
map_prior |
A robust MAP prior created by |
meta_analysis |
A data frame containing a meta-analysis of trial(s) to be borrowed from. See |
A data frame ready to be used for tipmap_plot()
and get_tipping_point()
create_new_trial_data
, create_posterior_data
, tipmap_plot
, get_tipping_points
# specify new trial data
new_trial_data <- create_new_trial_data(n_total = 30, est = 1.5, se = 2.1)
# read MAP prior data
map_prior <- load_tipmap_data("tipmapPrior.rds")
# read posterior data
posterior <- load_tipmap_data("tipPost.rds")
tip_dat <- create_tipmap_data(
new_trial_data = new_trial_data,
posterior = posterior,
map_prior = map_prior
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.