Dear Stata users,
I have a dataset with two groups (0,1) and two time periods (0,1). The dummy for the groups is group_dummy and the dummy for the time periods is time_dummy. The variable of interest is X.
I need to test the difference in the variances of X among both groups in both time periods, separately.
I think this can be done using the command:
robvar X if time_dummy==0, by (group_dummy)
robvar X if time_dummy==1, by (group_dummy)
This works perfectly and life is good so far.
Now I construct a new variable Ratio which equals the [Variance(X | group_dummy=1) / Variance(X | group_dummy=0)].
The table below shows the numbers which I got from Stata after executing the commands above and after calculating the Ratio variable.
My question is: how can I test the statistical significance of the difference in the Ratio between time 0 and time 1?
Hint: I think that I can test that (1.56/1.35) is significantly different than 1. But how to do it in the context of variances?
Thank you so much for your valuable suggestions. I truly appreciate your help.
Mostafa
I have a dataset with two groups (0,1) and two time periods (0,1). The dummy for the groups is group_dummy and the dummy for the time periods is time_dummy. The variable of interest is X.
I need to test the difference in the variances of X among both groups in both time periods, separately.
I think this can be done using the command:
robvar X if time_dummy==0, by (group_dummy)
robvar X if time_dummy==1, by (group_dummy)
This works perfectly and life is good so far.
Now I construct a new variable Ratio which equals the [Variance(X | group_dummy=1) / Variance(X | group_dummy=0)].
The table below shows the numbers which I got from Stata after executing the commands above and after calculating the Ratio variable.
time_dummy == 0 | time_dummy == 1 | ||||
group_dummy | N | Variance | group_dummy | N | Variance |
0 | 2,658 | 0.0235 | 0 | 3,215 | 0.0233 |
1 | 2,636 | 0.0316 | 1 | 2,100 | 0.0365 |
F-stat | df | Ratio = Var(1) / Var(0) | F-stat | df | Ratio = Var(1) / Var(0) |
35.20 | 5292 | 1.35 | 77.78 | 5313 | 1.56 |
My question is: how can I test the statistical significance of the difference in the Ratio between time 0 and time 1?
Hint: I think that I can test that (1.56/1.35) is significantly different than 1. But how to do it in the context of variances?
Thank you so much for your valuable suggestions. I truly appreciate your help.
Mostafa
Comment