Hi everybody,
I have a dataset where each year parties (from different countries) running for elections are evaluated and assigned a score based on their programme. So the dataset contains repeated cross sections.
I want to run a regression with year fixed effects and countries fixed effects, and I am using the following code:
xtset country_num year
xi: reg score i.year i.country_num
where country_num is the variable identifying the country.
I found a hint to write it in an old post, but I wanted to be sure it works also with repeated cross sections (and not just with panel data). Also, if it's not the right code, which commands should I use?
Thanks in advance
Related Posts with Repeated cross sections
ignore insufficient observations and run the loop without breakingHi, I would like to calculate cumulative security residual return, which is residual in a regression…
Error message "Maximum numbers of iterations exceeded"Hello, I am in the process of building a regression model with a DV (q_tot), an IV (rdalliances), a…
How To Count Identical Values As One Without DroppingDear Stata Community, I'm trying to 'count the number of years each person attended the conference …
How to replace value of a variable in one round with its value in a previous round ?Hi all, Please consider the following sample data Code: * Example generated by -dataex-. To insta…
Test for heteroskedasticity after spxtregressThe spatial Stata manual (https://www.stata.com/manuals/sp.pdf) makes clear that heteroskedasticity …
Subscribe to:
Post Comments (Atom)
0 Response to Repeated cross sections
Post a Comment