Description Usage Arguments Value Examples
Calculate homeostatic disregulation in a dataset.
1 |
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. |
An object of class 'hd'. This object is a list with two elements (data and fit), and two methods (extract_data and extract_fit).
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']
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.