View source: R/score_calculator.R
| MetSScore | R Documentation |
Computes a composite MetS score from individual z-scores of clinical biomarkers.
MetSScore(df)
df |
A data frame containing the following columns: 'waist_z.score', 'homa_z.score', 'sbp_z.score', 'dbp_z.score', 'trg_z.score', and 'hdl_z.score'. These are expected to be numeric vectors representing z-scores. |
The MetS score is computed as:
'waist_z + homa_z + 0.5 × (sbp_z + dbp_z + trg_z - hdl_z)'
A numeric vector representing the calculated MetS score for each row in the input data.
df <- data.frame(
waist_z.score = c(1.2, 0.5),
homa_z.score = c(0.8, 0.6),
sbp_z.score = c(0.7, 0.3),
dbp_z.score = c(0.6, 0.4),
trg_z.score = c(1.0, 0.9),
hdl_z.score = c(-0.5, -0.2)
)
MetSScore(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.