Assuming I have a sample that includes 10 stocks (ID1 to ID 10) and two types of traders (Foreign=0 and Domestic=1 ) as showing following.
ID | Type | Closing price |
1 | 1 | 4 |
1 | 0 | 4 |
2 | 1 | 1 |
2 | 0 | 1 |
3 | 1 | 6 |
4 | 1 | 7 |
5 | 1 | 7 |
6 | 0 | 8 |
6 | 1 | 8 |
7 | 0 | 6 |
7 | 1 | 6 |
8 | 1 | 8 |
9 | 0 | 5 |
10 | 0 | 4 |
Code:
.svyset _n . svy: regress close_price if type==0 . estimates store eq1 . svy: regress close_price if type==1 . estimates store eq2 . suest eq1 eq2 . lincom [eq1]_cons - [eq2]_cons, noci
0 Response to How to apply partially overlapping samples t-test
Post a Comment