kdm_calc | R Documentation |
Project KDM algorithm onto new data.
kdm_calc(data, biomarkers, fit = NULL, s_ba2 = NULL)
data |
A projection dataset. |
biomarkers |
A character vector indicating the names of the biomarkers included in the KDM Biological Age algorithm. |
fit |
An S3 object for model fit. If the value is NULL, then the parameters to use for training KDM Biological Age are calculated. |
s_ba2 |
A particular fit parameter. Advanced users can modify this parameter to control the variance of KDM Biological Age. If left NULL, defaults are used. |
Projecting KDM algorithm onto new data.
An object of class "kdm". This object is a list with two elements (data and fit). The dataset can be drawn by typing 'data'. The model can be drawn by typing 'fit'.
#Train using the NHANES III
train = kdm_calc(NHANES3,
biomarkers = c("fev","sbp","totchol","hba1c","albumin",
"creat","lncrp","alp","bun"))
#Project into the NHANES IV
kdm = kdm_calc(NHANES4,
biomarkers = c("fev","sbp","totchol","hba1c","albumin",
"creat","lncrp","alp","bun"),
fit = train$fit,
s_ba2 = train$fit$s_ba2)
#Extract KDM dataset
data = kdm$data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.