Hey, I woul like to know how I could do the t-test between 2 variables if I calculated the mean with an if condition (if the dummy has the value 1)
So I did: egen meanvar1=mean(var) if dummy1==1
egen meanvar2=mean(var) if dummy2==1
Now I want to do know wether the difference between meanvar1 and meanvar2 is significantly different to zero.
Hope you can help me!