Can't replicate kdm0 #40
|
Dear Dayoon Kwon, thank you for this nice package! I've successfully used the PhenoAge functionality to create custom models, and am now looking into KDM. As a first step, I repeated the training on NHANES 3 you did when preparing the data sets (lines 944 and following in nhanes_all.R). I.e. I used the same set of biomarkers and filter conditions for training:
However, in Could you please help me understand what I'm doing wrong? Thank you very much, and best regards |
Replies: 2 comments 2 replies
|
|
|
Dear Dayoon Kwon, Thank you for your reply, and sorry, I did not phrase my question properly. I was specifically asking about Now for PhenoAge, these published coefficients are hard-coded in nhanes_all.R from line 972 onwards and I can replicate the column However, the calculation of Thus I was wondering what the column Thank you & kind regards |
The
kdm0values in the provided NHANES datasets were computed with an earlier version ofkdm_calcthat handled missing biomarkers differently. The current version ofkdm_calcincludes a rescaling step for missing biomarkers that was not present whenkdm0was originally computed. This is why re-runningnhanes_all.Rwith the current code produces slightly different values. The underlying algorithm and biomarker set are the same — the difference is in how participants with incomplete data are handled during the variance (s_ba2) estimation.