use "http://www.stata-press.com/data/r14/nhanes2b", clear svyset psuid [pweight=finalwgt], strata(stratid) la var race "Race" la var sex "Sex" la var diabetes "Diabetes" la def ny 0 "No" 1 "Yes", modify la val diabetes ny tabout race sex diabetes using table18.tex, replace /// style(tex) font(italic) twidth(12) c(row se) svy /// stats(chi2) f(1 3) mult(100) npos(col) h2c(2 2 1) /// nlab(Obs) title(Table 18: Survey data /// example with standard errors) fn(Source: nhanes2b.)