asdoc xtreg wage experience union i.year, fe
Before running regressions, you must tell Stata that your data has a panel structure using the command. stata panel data
If effects of time-varying variables differ across panels: asdoc xtreg wage experience union i
: Use the xtset command to tell Stata which variables represent your entities and your time periods. Command: xtset id year asdoc xtreg wage experience union i.year