Closed dewittpe closed 10 months ago
Expect the second and first call to p_bp to give the same result. Likely issue is in the logic for use of the height percentile when height is NA
p_bp
NA
> ht <- q_stature_for_age(p = 0.90, age = 44, male = 1) > ht [1] 105.2123 > p_bp(q_sbp = 100, q_dbp = 60, age = 44, male = 1, height = ht) $sbp_percentile [1] 0.7086071 $dbp_percentile [1] 0.8485735 > p_bp(q_sbp = 100, q_dbp = 60, age = 44, male = 1, height_percentile = 0.9) $sbp_percentile [1] 0.7700861 $dbp_percentile [1] 0.72739 > p_bp(q_sbp = 100, q_dbp = 60, age = 44, male = 1, height_percentile = 0.5) $sbp_percentile [1] 0.7700861 $dbp_percentile [1] 0.72739
Nevermind, this is expected. Both calls use Lo et.al. data where height is not needed, at all. If age was < 36 months then there would be a difference based on the height_percentile
Expect the second and first call to
p_bp
to give the same result. Likely issue is in the logic for use of the height percentile when height isNA