DATA Step, Macro, Functions and more

95th percentile of a continuous variable for all observations

Accepted Solution Solved
Reply
Super Contributor
Posts: 374
Accepted Solution

95th percentile of a continuous variable for all observations

I'd like to calculate 95th percentile of each BMI observation of the data (attached). 

 

Attached is the correct data (first 100 observations of real data) where bmi95 is 95th pctl for each BMI values. Do you know how I can reproduce it in SAS? My actual data has only BMI.

 


Accepted Solutions
Solution
‎06-07-2018 01:45 PM
Super User
Posts: 13,583

Re: 95th percentile of a continuous variable for all observations

The CDC code is not much use without the WHO data and descriptions. Since the CDC code has parameters built in for its distribution I don't see any way to "replicate" the code without the parameters from WHO. Since CDC has not, at least as far as I have found, released the modeling used to build their parameter data set and the data used to build that model ...

 

Have you looked at http://www.who.int/childgrowth/standards/bmi_for_age/en/  ? and all the related pages. There are some data tables with percentiles and such by age but I haven't the time to find all the details. Also there are some software downloads there that may be applicable. I doubt that you will get a direct comparable program to the CDC SAS code. Also you need to pick your ages of interest.

View solution in original post


All Replies
Super User
Posts: 23,778

Re: 95th percentile of a continuous variable for all observations

How are you defining that? You can calculate the percentiles for each observation, but I’m not familiar with a statistic that is the ‘95th percentile’ for each observation. By definition, the 95th percentile for a data set is a specific value. If you want the percentile for each observation that’s relatively trivial.
Super Contributor
Posts: 374

Re: 95th percentile of a continuous variable for all observations

@Reeza

Attached is publicly available SAS code to showcase how bmi95 is calculated for BMI based on CDC growth chart. I'm trying to do the same thing for BMI based on WHO data growth chart.

Attachment
Super User
Posts: 23,778

Re: 95th percentile of a continuous variable for all observations

Can’t open SAS files at the moment. If I remember later, I’ll try and check back in. 

Solution
‎06-07-2018 01:45 PM
Super User
Posts: 13,583

Re: 95th percentile of a continuous variable for all observations

The CDC code is not much use without the WHO data and descriptions. Since the CDC code has parameters built in for its distribution I don't see any way to "replicate" the code without the parameters from WHO. Since CDC has not, at least as far as I have found, released the modeling used to build their parameter data set and the data used to build that model ...

 

Have you looked at http://www.who.int/childgrowth/standards/bmi_for_age/en/  ? and all the related pages. There are some data tables with percentiles and such by age but I haven't the time to find all the details. Also there are some software downloads there that may be applicable. I doubt that you will get a direct comparable program to the CDC SAS code. Also you need to pick your ages of interest.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 80 views
  • 2 likes
  • 3 in conversation