cov.transform.age: cov.transform.age

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Function to determine how the age category in a given dataset should be transformed in order to equally weight the age range when clustering

Usage

1
2
  cov.transform.age(dataset, age.colname = "Age",
    age.units = c("d", "w", "m", "y"))

Arguments

dataset

data frame containing marker values and at least one column containing age data.

age.colname

character string containing the exact name of the column containing age data.

age.units

character array containing the shorthand values used to define days, weeks, months and years, where necessary in data files

Details

This gives the user the option to choose whether or not to transform the age data, and if so, whether to use a log or a Box-Cox transform for optimal uniformity

Value

a list containing the original data with appended Box-Cox transformed ages, the optimal lambda and a ggplot of the transformed, log-transformed and untransformed distributions for comparison

Author(s)

Alexander D. Rowe

See Also

BoxCox.uniformity

Examples

1
cov.transform.age(data.frame(analyte=rnorm(20,1), Age=rexp(20,1)*10 ))

adrowe1/devclir documentation built on May 10, 2019, 5:59 a.m.