Hello everyone!

I am working with panel data consisting of 9 countries over the period of 2000-2017. I want to use country, time and both country and time random effects in my model but a little bit confused with commands. My panel setting is "xtset country_id year".

For time random effects, is the command the same as for time fixed effects, when you only need command "reg y x i.year"?

Does command for country random effects looks like "xtreg y x i.country_id, re" and for both country and time random effects "xtreg y x i.country_id i.year, re"?

Thank you for your help, Sergey Medvedev