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
Zero inflated negative binomial regression vs negative binomial regressionHello everyone, I am running an analysis to see if serum cholesterol together with sex, DBP, and Ag…
Confirmatory factor analysis with high-frequency longitudinal dataDoes anybody know of a Stata program that can do confirmatory factor analysis in longitudinal data o…
Clustering variablesHello everyone, I acutally have a problem with clustering and building the mean. My dataset contai…
Why Multivariate L1 distance from Coarsened Exact Matching (CEM) is so high compared to Univariate imbalance for each matching covariate?I was looking at a paper (link here) by Blackwell et al. (2010) on CEM in Stata. In one example usin…
Extracting month value from timestampI am working with survey data and there is a variable called "timestamp". Here is an observation fro…
Subscribe to:
Post Comments (Atom)
0 Response to categorizing continuous data
Post a Comment