Hello,
I'm testing the effect of wcsrindex on wtob and I want to apply the Difference in means test. So I have to divide the observations into 2 groups:
Group 1 having wcsrindex >= median of wcsrindex
Group 2 having wcsrindex < median of wcsrindex
After that I apply the t test using the Stata command :
ttest wtob, by(group)
The problem here that I got 2 groups that do not have the equal number of observations.
Here is the output stata :

Can somebody help me to generate 2 groups which group 1 has the value of wcsrindex >= median of wcsrindex (0,7621875) and group 2 the value of wcsrindex < median of wcsrindex (0,7621875) with an equal observations' number. Please !
I'm testing the effect of wcsrindex on wtob and I want to apply the Difference in means test. So I have to divide the observations into 2 groups:
Group 1 having wcsrindex >= median of wcsrindex
Group 2 having wcsrindex < median of wcsrindex
After that I apply the t test using the Stata command :
ttest wtob, by(group)
The problem here that I got 2 groups that do not have the equal number of observations.
Here is the output stata :
Can somebody help me to generate 2 groups which group 1 has the value of wcsrindex >= median of wcsrindex (0,7621875) and group 2 the value of wcsrindex < median of wcsrindex (0,7621875) with an equal observations' number. Please !
Comment