Hi all,

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
If I want to test whether the mean closing price for foreign traders is statistically different from the mean price for domestic traders, is the following approach is correct?. This approach is from: https://www.statalist.org/forums/for...lapping-groups . If this approach is not appropriate for my sample, could anyone give me some suggestions?


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