Hi everyone,

I was trying to include linear and quadratic id specific time trends in my model (separately in two different models). I used the following code. Can anyone confirm if I did the correct code? Any help would be highly appreciated:

Linear time trend: i.Country##c.Year
Quadratic time trend: ***Generating variable for quadratic time trend.
egen Year1=group(Year)
gen Year2=Year1^2
i.Country1##c.Year2

One additional question I was facing was, how will the results differ if I use one "#" instead of two "##"? Thank you!