I have 3 questions regarding XTSUR
1:
When I input something like
XTSUR (y1 y2 y3 = x1 x2 i.year)
It says factor variable not allowed; Is there anything wrong I did? How to fix this?

2:
Why the number of groups is so few in XTSUR outcome table?
This is the analysis result I have:

One-way random effect estimation:
------------------------------------------------------------------------------
Number of Group variable: 15 Number of obs = 1590
Panel variable: gvkey Number of eqn = 3
Time variable : year Number of panels = 15

I have this unbalanced panel data, with have more than 100 firms across 18 years (2000-2017). The number of observations seems OK (1590); but the number of panels is only 15, which does not make sense to me. It should be at least 100 or something. Is there anything I did wrong?

Thank you

3. Is it possible to adjust for the clustered error or realize the similar purpose equals to using something like vce(cluster gvkey)?