hd: Calculate homeostatic disregulation in a dataset.

Description Usage Arguments Value Examples

Description

Calculate homeostatic disregulation in a dataset.

Usage

1
hd(data, biomarkers, fit = NULL, filter = NULL)

Arguments

data

The dataset for calculating homeostatic disregulation.

biomarkers

A character vector indicating the names of the variables for the biomarkers to use in calculating homeostatic disregulation.

fit

An S3 object for model fit. If the value is NULL, then the parameters to use for training homeostatic disregulation are calculated.

filter

a list with biomarker names that identifies any restrictions in training data. These are generally a young, "healthy" reference group, i.e. a group within clinical guidelines.

Value

An object of class 'hd'. This object is a list with two elements (data and fit), and two methods (extract_data and extract_fit).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#(not run)
#Train homeostatic disregulation
train = hd(data=nhanes,
           biomarkers=c('sysbp','totchol','bun','cmv','mcv'),
           fit=list(sysbp='',
                    totchol='',
                    bun='',
                    cmv='',
                    mcv=''
           ))

#Use training data to calculate out-of-sample biological ages
valudate = kdm_calc(data,fit=train$fit,
  biomarkers=c('sysbp','totchol','bun','cmv','mcv'))

#combine biological ages calculated using training parameters
data$bioage = extract_data(biocalc)[,'bioage']

bjb40/bioage documentation built on May 20, 2019, 3:05 p.m.