This function takes multiple imputed datasets (as generated by the impute() function from the rbmi package) and runs an analysis function on each of them.
Use
rbmi::analyse() instead.
Usage
rbmi_analyse(
imputations,
fun = rbmi_ancova,
delta = NULL,
...,
cluster_or_cores = 1,
.validate = TRUE
)Arguments
- imputations
An
imputationsobject as created by the impute() function from the rbmi package.- fun
An analysis function to be applied to each imputed dataset. See details.
- delta
A
data.framecontaining the delta transformation to be applied to the imputed datasets prior to runningfun. See details.- ...
Additional arguments passed onto
fun.- cluster_or_cores
(
numericorcluster object)
The number of parallel processes to use when running this function. Can also be a cluster object created bymake_rbmi_cluster(). See the parallelisation section below.- .validate
(
logical)
Shouldimputationsbe checked to ensure it conforms to the required format (default =TRUE) ? Can gain a small performance increase if this is set toFALSEwhen analysing a large number of samples.
Value
An analysis object, as defined by rbmi, representing the desired
analysis applied to each of the imputed datasets in imputations.
Details
This function works by performing the following steps:
Extract a dataset from the
imputationsobject.Apply any delta adjustments as specified by the
deltaargument.Run the analysis function
funon the dataset.Repeat steps 1-3 across all of the datasets inside the
imputationsobject.Collect and return all of the analysis results.
The analysis function fun must take a data.frame as its first
argument. All other options to rbmi_analyse() are passed onto fun
