Validates that a dataset fulfils requirements for MBNMA
mb.validate.data.Rd
Validates that a dataset fulfils requirements for MBNMA
Arguments
- data.ab
A data frame of arm-level data in "long" format containing the columns:
studyID
Study identifierstime
Numeric data indicating follow-up timesy
Numeric data indicating the aggregate response for a given observation (e.g. mean)se
Numeric data indicating the standard error for a given observationtreatment
Treatment identifiers (can be numeric, factor or character)class
An optional column indicating a particular class identifier. Observations with the same treatment identifier must also have the same class identifier.n
An optional column indicating the number of participants used to calculate the response at a given observation (required if modelling using Standardised Mean Differences)standsd
An optional column of numeric data indicating reference SDs used to standardise treatment effects when modelling using Standardised Mean Differences (SMD).
- 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 (
single.arm=FALSE
)- CFB
A boolean object to indicate if the dataset is composed of studies measuring change from baseline (
TRUE
) or not (FALSE
). It is not essential to specify this correctly but failing to do so may lead to warnings.
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