mb.validate.data {MBNMAtime} | R Documentation |
Validates that a dataset fulfils requirements for MBNMA
Description
Validates that a dataset fulfils requirements for MBNMA
Usage
mb.validate.data(data.ab, single.arm = FALSE, CFB = TRUE)
Arguments
data.ab |
A data frame of arm-level data in "long" format containing the columns:
|
single.arm |
A boolean object to indicate whether or not function should allow singe arm studies to
be allowed in the network without returning an error. Default is not to allow their inclusion ( |
CFB |
A boolean object to indicate if the dataset is composed of studies measuring change from
baseline ( |
Details
Checks done within the validation:
Checks data.ab has required column names
Checks there are no NAs
Checks that all SEs are positive
Checks that studies have baseline measurement (unless change from baseline data is being used)
Checks that arms are balanced at each time point
Checks that class codes are consistent within each treatment
Checks that treatment codes are consistent across different time points within a study
Checks that studies have at least two arms (if
single.arm = FALSE
)Checks that standsd values are consistent within a study
Value
An error or warnings if checks are not passed. Runs silently if checks are passed