Hi all,

I am not so sure if my logic for the code is right or wrong. I have to check if the age and sex distribution of the participants in the sample is similar to those not in the sample.

What I did is as follows:

use xxx_data, clear
sample 100, count
count

Sample
su age, detail
su sex, detail

Population
use xxx_data, clear
su age, detail
su sex, detail

Is this the right way to approach or did I make a mistake along the way?