5.2 Estimation of population means

In CLSA, the variables \(\texttt{HWT_DHT_M_TRM}\) and \(\texttt{HWT_WGHT_KG_TRM}\) represent the self-reported height (in meter) and weight (in kilogram), respectively. To estimate the population averages of height and weight of the target population, we can apply the following sets of code to create tables of mean estimates with standard errors.

R

svymean( ~ HWT_DHT_M_TRM + HWT_WGHT_KG_TRM , CLSA.design )

SAS

PROC SURVEYMEANS data = CLSAData ;        
VAR HWT_DHT_M_TRM HWT_WGHT_KG_TR;                                           
STRATA GEOSTRAT_TRM ; 
WEIGHT WGHTS_INFLATION_TRM;                                      
RUN; 

SPSS

Click “Analyze” \(\rightarrow\) “Complex Samples” \(\rightarrow\) “Descriptive…” \(\rightarrow\) Browse and select the “\(\texttt{CLSADesign.csaplan}\)\(\rightarrow\) Click “\(\texttt{Continue}\)” and enter height variable “\(\texttt{HWT_DHT_M_TRM}\)” and the weight variable “\(\texttt{HWT_WGHT_KG_TRM}\)” to the “Measures:” panel \(\rightarrow\) click “Statistics…” \(\rightarrow\) select “Mean” and “Standard error” \(\rightarrow\) click “Continue” \(\rightarrow\) click “OK”.

Stata

svy linearized : mean HWT_DHT_M_TRM  HWT_WGHT_KG_TRM  
Result comparison
Variable Estimate R SAS SPSS Stata
HWT_DHT_M_TRM Mean 1.6776 1.6776 1.6776 1.6776
SE 0.0040 0.0040 0.0040 0.0040
HWT_WGHT_KG_TRM Mean 77.8405 77.8405 77.8405 77.8405
SE 0.9657 0.9657 0.9657 0.9657