Profile of common covariate combinations among patients
Data.table object where each row represents a patient and each row represents a covariates (or risk factor)
An integer, character, or factor vector. The primary covariate to group by and calculate proportions for (usually age)
Additional covariates to group by - e.g. gender, status of previous exposures/events, etc. Accepts vectors of integers, characters or factors
The function is designed to show how many patients exists in the dataset that have each combination of risk factors.
Covariate combinations will that conatin 0 patients will return a 0 value for that covariate combination. However, this assumes that all possible outcomes for each variable are found in at least one patient in the dataset. For example, using "age" as a covariate, if the dataset ranges from 20 to 50 years olds, it is assumed that at least one patient from every interger age is present i.e. 20, 21, 22....50. If there are no patients aged 22, for example, then no covariate combinations with patients aged 22 will be created.
Returns a data.table object where each row is a covariate
N.in.primary.cov records the number of patients in the
data set with the specified primary covariate. E.g. using the "age" example
from the "details" section, this column would record how many patients are
20, 21, 22....50.
prop.by.primary.cov records the proportion of patients with the
same primary covariate (
primary.cov) with that parameter
Matthew Phelps [email protected]
1 2 3 4 5 6 7 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.