hd_calc | R Documentation |
Project HD algorithm onto new data.
hd_calc(data, reference, biomarkers)
data |
A projection dataset. |
reference |
A training dataset. |
biomarkers |
A character vector indicating the names of the biomarkers included in the HD algorithm. |
For HD algorithm., the constructed variable is based on a malhanobis distance statistic, which is theoretically the distance between observations and a hypothetically healthy, young cohort. You need to train separately for men and women who are between the ages of 20 and 30 and not pregnant, and have observe biomarker data within clinically accpetable distributions.
An object of class "hd". 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'.
#HD using NHANES
hd = hd_calc(NHANES4, NHANES3,
biomarkers=c("albumin_gL","lymph","mcv","glucose_mmol",
"rdw","creat_umol","lncrp","alp","wbc"))
#Extract HD dataset
data = hd$data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.