Configure the analysis
setup_configure.RdChecks the connectivity of the loaded data and converts it into formats for
later analyses. Conducts a frequentist analysis using netmeta::netmeta().
The output can be passed to many other functions - all summary_ and freq_
functions and bayes_model(), baseline_model() and covariate_model().
Usage
setup_configure(
loaded_data,
reference_treatment,
effects,
outcome_measure,
ranking_option,
seed,
logger = NULL
)Arguments
- loaded_data
list. Output from
setup_load()- reference_treatment
character. The reference treatment of the dataset
- effects
character. Type of model to fit, either
randomorfixed- outcome_measure
character. Outcome measure of the dataset. Either
OR,RRorRDwhenoutcomeisbinaryorMDorSMDwhenoutcomeiscontinuous- ranking_option
character.
goodif the treatment effect is desirable, elsebad- seed
numeric. Seed used to fit the models.
- logger
Stores all notification messages to be displayed in the Log Window. Insert the logger reactive list here for running in shiny, otherwise leave the default
NULL
Value
configured_data containing:
- treatments
dataframe. Treatment names and IDs
- reference_treatment
character. The selected reference treatment
- disconnected_indices
vector. Indices of studies that are not connected to the main network
- connected_data
dataframe. A subset of the data containing only connected studies
- non_covariate_data
dataframe. The uploaded data with covariates removed
- covariate
A list containing these items if covariate data exists or else empty:
- column
character. Name of the column containing covariate data
- name
character. Name of the covariate
- type
character. Whether the covariate is
binaryorcontinuous
- freq
list. Processed data for frequentist analyses created by
frequentist()- outcome
character. Whether the data is
binaryorcontinuous- outcome_measure
character. Outcome measure of the dataset.
- effects
character. Whether the models are
fixedorrandomeffects- ranking_option
character. Whether higher values in the data are
goodorbad- seed
numeric. A seed value to be passed to models
Examples
minimal_data_path <- system.file("extdata", "continuous_minimal.csv", package = "metainsight")
loaded_data <- setup_load(data_path = minimal_data_path,
outcome = "continuous")
configured_data <- setup_configure(loaded_data = loaded_data,
reference_treatment = "the Great",
effects = "random",
outcome_measure = "MD",
ranking_option = "good",
seed = 123)