I want to obtain some descriptives of a continuous variable by age group. I can achieve the numbers I want by using:
Code:
sort agegroup by agegroup: ci means FEV1
Code:
----------------------------------------------------------------------------------------------- -> agegroup = 20.0-24.9 Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- FEV1 | 222 3,886306 ,054983 3,777948 3,994664 ----------------------------------------------------------------------------------------------- -> agegroup = 25.0-29.9 Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- FEV1 | 301 3,965914 ,0489052 3,869673 4,062154 ----------------------------------------------------------------------------------------------- -> agegroup = 30.0-34.9 Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- FEV1 | 342 3,838918 ,0444053 3,751575 3,926261
Code:
agegroup | mean(FEV1) [95% Conf. Interval] ----------+---------------------------------------- 20.0-24.9 | 3,886306 3,777948 3,994664 25.0-29.9 | 3,965914 3,869673 4,062154 30.0-34.9 | 3,838918 3,751575 3,926261 etc.
0 Response to Tabulating means and CI for each level of a categorical variable
Post a Comment