I am fairly new to xtreg and what to sure I am doing the right thing:


Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input float(panelid visit) double sbp float condition byte sex
1  1 133 3 1
1  3 115 3 1
1  6 122 3 1
1  9 131 3 1
1 12   . 3 1
1 15   . 3 1
1 18   . 3 1
1 21 128 3 1
1 24 139 3 1
1 27 131 3 1
1 30 108 3 1
1 33 138 3 1
1 36 136 3 1
1 39   . 3 1
1 42 146 3 1
1 45 127 3 1
1 48 159 3 1
1 51   . 3 1
1 54   . 3 1
2  1 151 6 2
end
Code:
xtset panelid visit
xtreg sbp i.condition i.sex i.condition#i.sex, re vce(robust)
margins i.condition#i.sex
marginsplot, noci