Hello, I would be super grateful for some help with the following scenario
Maternal obesity is considered to influence birthweight of an infant, there is observational evidence to suggest that infants’ born to women with a high maternal BMI have a higher birthweight. This could be investigated by categorising the calculated maternal pre-pregnancy BMI into obesity classes (I, II, III) and then comparing these three categories with infant birthweight. Obtain histograms for infant birthweight for the obesity classes. What is the Stata code? What do the results show?
I have used the following to categorise:
generate bmiclass=.
(1,000 missing values generated)
replace bmiclass = 1 if BMI>30 & BMI<35
(524 real changes made)
replace bmiclass = 2 if BMI>34 & BMI<39
(340 real changes made)
.replace bmiclass = 3 if BMI>39
(232 real changes made)
The issue is when I try to create a histogram- I get this message:
twoway histogram neo_birthwgt, start (1500) width (500) by ( bmiclass)
option by() not allowed
My query relates to how else I would produce a histogram of BMI class against infant birth weight
Thanks
Related Posts with categorizing continuous data
Does VIF account for negative correlations?Does VIF account for inverse correlation? For example if you have two variables that are negatively …
Unexpected behavior with in-line if statementsI experienced a quirk with Stata. It appears that if statements read (and evaluate) the entire line,…
i do not know what to doHi all please i need help, i have 2 variables, 1: alcscore”: a continuous score containing the respo…
Adding a variable to a dataset from another datasetHi my original dataset (year 2007) had over 2000 variables and i dropped them all except from 8 vari…
Generate new variables from existing onesHi all please i need help, i have 2 variables, 1: alcscore”: a continuous score containing the respo…
Subscribe to:
Post Comments (Atom)
0 Response to categorizing continuous data
Post a Comment