View source: R/CompareCohorts.R
computeStandardizedDifference | R Documentation |
Computes the standardized difference for all covariates between two cohorts. The standardized difference is defined as the difference between the mean divided by the overall standard deviation.
computeStandardizedDifference(
covariateData1,
covariateData2,
cohortId1 = NULL,
cohortId2 = NULL
)
covariateData1 |
The covariate data of the first cohort. Needs to be in aggregated format. |
covariateData2 |
The covariate data of the second cohort. Needs to be in aggregated format. |
cohortId1 |
If provided, |
cohortId2 |
If provided, |
A data frame with means and standard deviations per cohort as well as the standardized difference of mean.
binaryCovDataFile <- system.file("testdata/binaryCovariateData.zip",
package = "FeatureExtraction"
)
covariateData1 <- loadCovariateData(binaryCovDataFile)
covariateData2 <- loadCovariateData(binaryCovDataFile)
covDataDiff <- computeStandardizedDifference(
covariateData1,
covariateData2,
cohortId1 = 1,
cohortId2 = 2
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.