hd_calc: hd_calc

View source: R/hd_calc.R

hd_calcR Documentation

hd_calc

Description

Project HD algorithm onto new data.

Usage

hd_calc(data, reference, biomarkers)

Arguments

data

A projection dataset.

reference

A training dataset.

biomarkers

A character vector indicating the names of the biomarkers included in the HD algorithm.

Details

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.

Value

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'.

Examples

#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



dayoonkwon/BioAge documentation built on Oct. 11, 2023, 1:33 a.m.