-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obtained percentiles are wrong for source=flynn2017 #22
Comments
Hi @wenlunyuan Thank you for the note. The behavior you describe is expected behavior and is documented on the package website:
The estimated value from the pedbp package are within 2 points of the published percentiles, and the quantiles are within 2mmHg from the published. If you have found anything out side of that range please let me know! I would also be interested to know how the results between the the SAS macro and the pedbp compare overall, not just on at the published values. |
Hi Peter,
That makes more sense. Thanks for you reply.
As an example,
for a boy aged 6y, having height=116, sbp=95.5 and dbp=56, I got sbp pct=53 and dbp pct=51 with the SAS macro.
Using your package, I got pct=69 and dbp pct=69.
However, I realized that for higher BP values, the difference tend to be smaller.
for a boy aged 6y , having height=111, sbp=107 and dbp=64, I got sbp pct=93 and dbp pct=84 with the SAS macro vs 94 and 89 with your package.
Best regards,
Wen Lun
…________________________________
De : Peter DeWitt ***@***.***>
Envoyé : mercredi 15 mai 2024 18:20:49
À : dewittpe/pedbp
Cc : Wenlun YUAN; Mention
Objet : Re: [dewittpe/pedbp] Obtained percentiles are wrong for source=flynn2017 (Issue #22)
Hi @wenlunyuan<https://github.com/wenlunyuan>
Thank you for the note. The behavior you describe is expected behavior and is documented on the package website:
https://www.peteredewitt.com/pedbp/articles/bp-distributions_ARTICLE.html#comparing-to-published-percentiles
The percentiles published in Expert Panel on Integrated Guidelines for Cardiovascular Health and Risk Reduction in Children and Adolescents (2011) and Flynn et al. (2017) where used to estimate a Gaussian mean and standard deviation. This was in part to be consistent with the values from Gemelli et al. (1990) and Lo et al. (2013). As a result, the calculated percentiles and quantiles from the pedbp package for Expert Panel on Integrated Guidelines for Cardiovascular Health and Risk Reduction in Children and Adolescents (2011) and Flynn et al. (2017) will be slightly different from the published values.
The estimated value from the pedbp package are within 2 points of the published percentiles, and the quantiles are within 2mmHg from the published.
If you have found anything out side of that range please let me know! I would also be interested to know how the results between the the SAS macro and the pedbp compare overall, not just on at the published values.
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BIQLUAYEA5L7ESJ7CXCC543ZCODODAVCNFSM6AAAAABHYJC2PWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJSHE3DQOBVGU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I'm curious what the inputs were that you used.
I get sbp percentile = 61 and dbp percentile = 59 library(pedbp)
packageVersion("pedbp")
#> [1] '2.0.0'
p_bp(q_sbp = 95.5, # mmHG
q_dbp = 56.0, # mmHg
age = 6 * 12, # 6 years = 72 months
male = 1,
height = 116, # cm
source = "flynn2017")
#> $sbp_p
#> [1] 0.6061342
#>
#> $dbp_p
#> [1] 0.5852371
I get sbp percentile 93 and dbp percentile 86 p_bp(q_sbp = 107,
q_dbp = 64,
age = 6 * 12, # 6 years = 72 months
male = 1,
height = 111,
source = "flynn2017")
#> $sbp_p
#> [1] 0.9344853
#>
#> $dbp_p
#> [1] 0.8595886 |
Hi,
could u try with this inputs?
p_bp(q_sbp = 95.5, q_dbp = 56.0, male=1,age=71, height=115.85, source="flynn2017")
$sbp_p
[1] 0.6825551
$dbp_p
[1] 0.7050552
For SAS, I got 53 and 51.
I have made this graph to compare the systematique differences between pedbp package percentiles against SAS macro percentiles
[cid:0f91cc8f-4353-4292-8c75-5eaf1909c22b]
Best,
Wen Lun
…________________________________
De : Peter DeWitt ***@***.***>
Envoyé : jeudi 16 mai 2024 18:09:57
À : dewittpe/pedbp
Cc : Wenlun YUAN; Mention
Objet : Re: [dewittpe/pedbp] Obtained percentiles are wrong for source=flynn2017 (Issue #22)
I'm curious what the inputs were that you used.
for a boy aged 6y, having height=116, sbp=95.5 and dbp=56, I got sbp pct=53 and dbp pct=51 with the SAS macro.
Using your package, I got pct=69 and dbp pct=69.
I get sbp percentile = 61 and dbp percentile = 59
library(pedbp)
packageVersion("pedbp")
#> [1] '2.0.0'
p_bp(q_sbp = 95.5, # mmHG
q_dbp = 56.0, # mmHg
age = 6 * 12, # 6 years = 72 months
male = 1,
height = 116, # cm
source = "flynn2017")
#> $sbp_p
#> [1] 0.6061342
#>
#> $dbp_p
#> [1] 0.5852371
for a boy aged 6y , having height=111, sbp=107 and dbp=64, I got sbp pct=93 and dbp pct=84 with the SAS macro vs 94 and 89 with your package.
I get sbp percentile 93 and dbp percentile 86
p_bp(q_sbp = 107,
q_dbp = 64,
age = 6 * 12, # 6 years = 72 months
male = 1,
height = 111,
source = "flynn2017")
#> $sbp_p
#> [1] 0.9344853
#>
#> $dbp_p
#> [1] 0.8595886
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BIQLUAYHD46U4F2XWPCI7HLZCTK5LAVCNFSM6AAAAABHYJC2PWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVGY2DONBVGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I get the same results you get: library(pedbp)
packageVersion("pedbp")
#> [1] '2.0.0' x <- p_bp(q_sbp = 95.5, q_dbp = 56.0, male=1,age=71, height=115.85, source="flynn2017")
x
#> $sbp_p
#> [1] 0.6825551
#>
#> $dbp_p
#> [1] 0.7050552 The mean and sd used for the estiamtes are based on a look up table and will attr(x, "bp_params")
#> source male age sbp_mean sbp_sd dbp_mean dbp_sd height_percentile
#> 1 flynn2017 1 60 90.9921 9.493194 51.00446 9.268235 5 In this case it is for age = 60 months. We should get the same results for x <- p_bp(q_sbp = 95.5, q_dbp = 56.0, male=1,age=seq(60, 71.9, by = 0.1), height=115.85, source="flynn2017")
str(x)
#> List of 2
#> $ sbp_p: num [1:120] 0.683 0.683 0.683 0.683 0.683 ...
#> $ dbp_p: num [1:120] 0.705 0.705 0.705 0.705 0.705 ...
#> - attr(*, "bp_params")='data.frame': 120 obs. of 8 variables:
#> ..$ source : chr [1:120] "flynn2017" "flynn2017" "flynn2017" "flynn2017" ...
#> ..$ male : int [1:120] 1 1 1 1 1 1 1 1 1 1 ...
#> ..$ age : num [1:120] 60 60 60 60 60 60 60 60 60 60 ...
#> ..$ sbp_mean : num [1:120] 91 91 91 91 91 ...
#> ..$ sbp_sd : num [1:120] 9.49 9.49 9.49 9.49 9.49 ...
#> ..$ dbp_mean : num [1:120] 51 51 51 51 51 ...
#> ..$ dbp_sd : num [1:120] 9.27 9.27 9.27 9.27 9.27 ...
#> ..$ height_percentile: num [1:120] 5 5 5 5 5 5 5 5 5 5 ...
#> - attr(*, "class")= chr [1:2] "pedbp_bp" "pedbp_p_bp" unique(x$sbp_p)
#> [1] 0.6825551 unique(x$dbp_p)
#> [1] 0.7050552 I am guessing that the SAS macro is using some form of interpolation. I’ve been considering developing and extending the pedbp methods to use Created on 2024-05-22 with reprex v2.1.0 |
Hi,
My apologies, I haven't been clear on the graph interpretation. The graph is actually data that I have simulated for age, height, sex, sbp and dbp and try to seek for systematic differences between your package and the SAS macro in the obtained percentiles.
Best,
Wen Lun
…________________________________
De : Peter DeWitt ***@***.***>
Envoyé : mercredi 22 mai 2024 23:44:32
À : dewittpe/pedbp
Cc : Wenlun YUAN; Mention
Objet : Re: [dewittpe/pedbp] Obtained percentiles are wrong for source=flynn2017 (Issue #22)
I get the same results you get:
library(pedbp)
packageVersion("pedbp")
#> [1] '2.0.0'
x <- p_bp(q_sbp = 95.5, q_dbp = 56.0, male=1,age=71, height=115.85, source="flynn2017")
x
#> $sbp_p
#> [1] 0.6825551
#>
#> $dbp_p
#> [1] 0.7050552
The mean and sd used for the estiamtes are based on a look up table and will
use the values for the the age
attr(x, "bp_params")
#> source male age sbp_mean sbp_sd dbp_mean dbp_sd height_percentile
#> 1 flynn2017 1 60 90.9921 9.493194 51.00446 9.268235 5
In this case it is for age = 60 months. We should get the same results for
any age in the interval [60, 72) given all other inputs are static.
x <- p_bp(q_sbp = 95.5, q_dbp = 56.0, male=1,age=seq(60, 71.9, by = 0.1), height=115.85, source="flynn2017")
str(x)
#> List of 2
#> $ sbp_p: num [1:120] 0.683 0.683 0.683 0.683 0.683 ...
#> $ dbp_p: num [1:120] 0.705 0.705 0.705 0.705 0.705 ...
#> - attr(*, "bp_params")='data.frame': 120 obs. of 8 variables:
#> ..$ source : chr [1:120] "flynn2017" "flynn2017" "flynn2017" "flynn2017" ...
#> ..$ male : int [1:120] 1 1 1 1 1 1 1 1 1 1 ...
#> ..$ age : num [1:120] 60 60 60 60 60 60 60 60 60 60 ...
#> ..$ sbp_mean : num [1:120] 91 91 91 91 91 ...
#> ..$ sbp_sd : num [1:120] 9.49 9.49 9.49 9.49 9.49 ...
#> ..$ dbp_mean : num [1:120] 51 51 51 51 51 ...
#> ..$ dbp_sd : num [1:120] 9.27 9.27 9.27 9.27 9.27 ...
#> ..$ height_percentile: num [1:120] 5 5 5 5 5 5 5 5 5 5 ...
#> - attr(*, "class")= chr [1:2] "pedbp_bp" "pedbp_p_bp"
unique(x$sbp_p)
#> [1] 0.6825551
unique(x$dbp_p)
#> [1] 0.7050552
I am guessing that the SAS macro is using some form of interpolation.
I’ve been considering developing and extending the pedbp methods to use
interpolations, but that has not yet been done.
Created on 2024-05-22 with reprex v2.1.0<https://reprex.tidyverse.org>
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BIQLUAY5QMB2NSRPGBF4CJTZDUGUBAVCNFSM6AAAAABHYJC2PWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVHAYTIMBVGU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@wenlunyuan - I recently had another user report a similar issue and I found and fixed an error in the code. Would you mind trying the dev version 2.0.2.9000 (commit dd02d8c) to see if the results between pedbp and the SAS macro as closer? I still expect them to be different, but the delta might be smaller. Thanks! |
Dear author,
I have been using a SAS macro to derive Flynn et al 2017 blood pressure percentiles. I compared the results obtained with your package after changing the source of data (to flynn2017) but I did not obtain the same percentiles.
I have checked for a child of a certain height, sex, age, sbp and dbp, the percentiles obtained from SAS macro and it was consistent with what is expected in Flynn et al 2017 percentiles table. However, using your package, the percentile obtained didn't fit the percentiles from Flynn et al table.
Could u check your package to provide a correction?
Best regards
Thanks
The text was updated successfully, but these errors were encountered: