covariateSummary: covariateSummary

View source: R/CovariateSummary.R

covariateSummaryR Documentation

covariateSummary

Description

Summarises the covariateData to calculate the mean and standard deviation per covaraite if the labels are input it also stratifies this by class label and if the trainRowIds and testRowIds specifying the patients in the train/test sets respectively are input, these values are also stratified by train and test set

Usage

covariateSummary(
  covariateData,
  cohort,
  labels = NULL,
  strata = NULL,
  variableImportance = NULL,
  featureEngineering = NULL
)

Arguments

covariateData

The covariateData part of the plpData that is extracted using getPlpData

cohort

The patient cohort to calculate the summary

labels

A data.frame with the columns rowId and outcomeCount

strata

A data.frame containing the columns rowId, strataName

variableImportance

A data.frame with the columns covariateId and value (the variable importance value)

featureEngineering

(currently not used ) A function or list of functions specifying any feature engineering to create covariates before summarising

Details

The function calculates various metrics to measure the performance of the model

Value

A data.frame containing: CovariateCount CovariateMean and CovariateStDev plus these values for any specified stratification


OHDSI/PatientLevelPrediction documentation built on Sept. 15, 2024, 6:38 a.m.