Hi everyone, I am working on a project and have to find a way to break my data into percentiles. I have the BMI information but since it is data from children, there is no set cutoff point for the different categories (underweight, healthy weight, overweight and obese). I would be using the following cutoff values: CDC Growth Charts 5th and 95th percentile BMI-for-age ≥ 95th Obesity BMI-for-age ≥ 85th and < 95th Overweight BMI-for-age < 5th Underweight So basically I need to find a way to use the age, gender and BMI information that I have for each child and create a new variable that would classify them based on what category they fall in. Here are links to the growth charts for boys and girls if anyone isn't familiar with them: http://www.cdc.gov/growthcharts/data...l/cj41l023.pdf http://www.cdc.gov/growthcharts/data...l/cj41l024.pdf Can anyone help? *I posted on another forum but no one was able to help: http://www.talkstats.com/showthread.php/53437-New-to-SPSS-want-to-find-out-if-there-is-a-way-to-create-BMI-category-variable?p=150054#post150054 |
Administrator
|
In reply to this post by sarahcel
Your links are dysfunctional!
The page you requested cannot be found at this time. It may be temporarily unavailable or it may have been removed. However, see MATCH FILES as a start (TABLE subcommand)!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by sarahcel
see my comment at
http://stats.stackexchange.com/questions/84100/find-out-if-there-is-a-way-to-create-bmi-weight-category-variable I couldn't find these links for the charts just now either, though I did find them earlier this evening. CDC has put them somewhere else, but you can find the via their website. However the Excel spreadsheet calculators provide a more promising approach as you should be able to adapt the formulae for SPSS to determine the percentiles and from there be able to categorise them. |
In reply to this post by David Marso
Sorry about the links, they were working fine yesterday. Here are some new ones: http://www.cdc.gov/growthcharts/data/set1clinical/cj41c023.pdf http://www.cdc.gov/growthcharts/data/set1clinical/cj41c024.pdf |
In reply to this post by sarahcel
Did something similar a while ago. Does this work for you?
/PR * Location of Reference Data File downloaded from *. * http://www.cdc.gov/growthcharts/percentile_data_files.htm *. * Make sure reference data table does not have an inserted field *. * title row between males & females. *. FILE HANDLE fpRefData /NAME='C:\Temp'. *--- Demo data ---*. NEW FILE . DATA LIST FREE / ID Sex AgeMos Wt . BEGIN DATA 1 1 12 8 2 1 14 13 3 1 8 9 4 2 33 14 5 2 28 16 END DATA . DATASET NAME dsTestData . VARIABLE LABELS Sex 'Sex' /AgeMos 'Age (months)' /Wt 'Weight (kg)' . VALUE LABELS Sex 1 'Male' 2 'Female' . FORMATS Sex (F1.0) AgeMos (F6.1) Wt (F6.1) . *--- test data and table data must have identical values to match ---*. COMPUTE AgeMos1=TRUNC(AgeMos). EXECUTE . *--------------------------------------------------------------------*. *--- Get reference data to look-up table ---*. *--- Both inspected files have achors at 0 and 24, respectively ---*. *--- Age data is centered i.e. 24.5 = (24.0 <= x < 25.0) ---*. *--- The file WtAgeInf contains ages 0- 36 months ---*. *--- Birth age is 0; first month (0 < x < 1.0) ---*. GET DATA /TYPE=XLS /FILE='fpRefData\wtageinf.xls' /SHEET=name 'wtageinf' /CELLRANGE=full /READNAMES=on /ASSUMEDSTRWIDTH=32767. *--- The file WtAge contains ages 24-240 months ---*. *--- Youngest age is 24; first month (24.0 <= x < 25.0) ---*. *GET DATA /TYPE=XLS /FILE='fpRefData\wtage.xls' /SHEET=name 'wtage' /CELLRANGE=full /READNAMES=on /ASSUMEDSTRWIDTH=32767. EXECUTE. DATASET NAME dsWtAgeRef WINDOW=FRONT. VALUE LABELS Sex 1 'Male' 2 'Female' . VARIABLE LABELS Sex 'Sex' /Agemos 'Age (months)' /L 'power in the Box-Cox transformation' /M 'Mean weight (kg)' /S 'Standard deviation' . SELECT IF NOT ((AgeMos=0) OR (AgeMos=24)) /* Remove anchors */ . *--- test data and table data must have identical values to match ---*. COMPUTE AgeMos1 = TRUNC(AgeMos) /*Integer months*/. SORT CASES Sex(A) AgeMos1(A) . *--- Add Ref Data variables to Test Data ---*. DATASET ACTIVATE dsTestData . SORT CASES Sex(A) AgeMos1(A). MATCH FILES /FILE=* /TABLE=dsWtAgeRef /BY Sex Agemos1 /DROP P3 TO P97 . EXECUTE. *--- Calculate z-scores (or do percentiles directly) ---*. DO IF (L<>0). COMPUTE Z=((Wt/M)**L-1)/(L*S) /* P=CDFNORM(((Wt/M)**L-1)/(L*S)) */ . ELSE. COMPUTE Z=LN(Wt/M)/S /* P=CDFNORM(LN(Wt/M)/S) */ . END IF. *--- z to percentiles ---*. COMPUTE P=CDFNORM(Z) . * BMI-for-age ≥ 95th Obesity *. * BMI-for-age ≥ 85th and < 95th Overweight *. * BMI-for-age < 5th Underweight *. COMPUTE grpBMI= 1* (P< 0.05) + 2*((P>=0.05) AND (P<0.85)) + 3*((P>=0.85) AND (P<0.95)) + 4* (P>=0.95) . VALUE LABELS grpBMI 1 'Underweight' 2 'Normal weight' 3 'Overweight' 4 'Obesity' . FORMATS Z P (F4.2) grpBMI (F3.0) . EXECUTE. DELETE VARIABLES AgeMos1 L M S Z . LIST . |
Free forum by Nabble | Edit this page |