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!
Related Posts with T-Test between two varibles with dummy condition
Constructing Appropriate WeightsI have a dataset of households. The level of the data is as follows: households < district < …
Calculating sex ratioDear All, It must be something simple but I couldn't find any help on web. I wanted to know whether…
Merging panel data and time series with different time formatsHey, I have the following problem; I have 2 datasets; a panel dataset where the time variable is a …
Interpreting the modelI was wondering if someone can please help me. If the regression is: "reghdfe Attendance GovInterven…
Coefplot - how to get mlabels similar to sorted ylabels?Dear Statalister, I'm trying to substitute ylabels with mlabels, but can't get the mlabels to sort …
Subscribe to:
Post Comments (Atom)
0 Response to T-Test between two varibles with dummy condition
Post a Comment