--- title: -log2markup- example author: - | Niels Henrik Bruun \ Unit of Clinical Biostatistics, \ Aalborg University Hospital, Aalborg, Denmark date: 2022-04-21 abstract: | **Background** Infant mortality rates and birth defect rates are very high for low birth weight babies. A woman's behaviour during pregnancy can greatly alter the chances of carrying the baby to term. \ **Aim** To identify if smoking during pregnancy is associated with giving birth to a low birth weight baby. \ **Results** Smoking during pregnancy increases the risk for birthweights below 2500g both crude and adjusted for age and race. It is only white mothers, who have a higher risk. ... # Data ## Outcomes Two binary variables for birthweight below 1500g and 2500g. ## Exposure Smoking during pregnancy is the exposure. ## Counfounders The variables for mothers age and race are considered a confounder. ## Data management ~~~ use low bwt age race smoke using "http://www.stata-press.com/data/r12/hospid2.dta", clear rename low bwlt2500 generate bwlt1500 = bwt < 1500 if !missing(bwt) order bwlt1500, before(bwlt2500) label variable bwlt1500 "birthweight < 1500g" label variable bwlt2500 "birthweight < 2500g" label define no_yes 0 "No" 1 "Yes" label values bwlt* no_yes label define smoke 0 "No" 1 "Yes" label values smoke smoke label data "From: http://www.stata-press.com/data/r12/hospid2.dta" ~~~~ # Results ## Data description ---------------------------------------------------------------------------------------------------------- Columns by: smoked during pregnancy No Yes Total ------------------------------------- ------------------- ------------------- ------------------- n (%) 115 (60.8) 74 (39.2) 189 (100.0) age of mother, median (iqi) 23.0 (20.0; 26.0) 22.0 (19.0; 26.3) 23.0 (19.0; 26.0) race, n (%) white 44 (38.3) 52 (70.3) 96 (50.8) black 16 (13.9) 10 (13.5) 26 (13.8) other 55 (47.8) 12 (16.2) 67 (35.4) ---------------------------------------------------------------------------------------------------------- Table: **Table 1:** The variables ## Effect measurements ------------------------------------------------------------------------------------------------------------------------------------------------------------ Crude: RR Lower 95% CI Upper 95% CI Adj: RR Lower 95% CI Upper 95% CI --------------------- ------------------------------- ----------- -------------- -------------- --------- -------------- -------------- birthweight < 2500g smoked during pregnancy (Yes) 1.61 1.06 2.45 2.01 1.33 3.04 birthweight < 1500g smoked during pregnancy (Yes) 1.04 0.18 6.08 1.60 0.27 9.41 ------------------------------------------------------------------------------------------------------------------------------------------------------------ Table: **Table 2:** Crude and adjusted (age, race) effects. Smoking during pregnancy increases the risk for birthweights below 2500g both crude and adjusted for age and race. ## sub analyses ~~~ emc, at(14(2)28) yline(0) ytitle(log(RR)) name(fig1, replace): poisson bwlt2500 smoke age, vce(robust) graph export output/fig1.png, width(8000) replace ~~~~ ![**Figure 1: Effect modification by age.**](output/fig1.png) ~~~ poisson bwlt2500 i.smoke##i.race, vce(robust) margins r.smoke, over(race) marginsplot, yline(0) ytitle(log(RR)) title("") name(fig2, replace) graph export output/fig2.png, width(8000) replace ~~~~ ![**Figure 2: Effect modification by race.** It is only white mothers, who have a higher risk.](output/fig2.png)