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!
Related Posts with Creating country specific linear and quadratic time trends
Bug in margins with factor variable notation for quadratic termDescription: I think I found a bug with margins. specifically with the atmeans option. If the model…
not enough memory for "merge"Dear community! I am trying two merge two files based on a facilityID which, however, is a unique i…
How to save the predicted value of regressionsDear Statalists' Can any one help me how to save the predicted value of many regressions. I have to …
Categorize income variable due to quartilesHello, I assume the solution is very simple, but I'm just standing at a loss.... I have to categro…
forval loop with a time range and a large dataset: can it faster?Dear Stata users, I am using Stata 15.0 I have a variable "Dyadic_Tie", and it should be counted h…
Subscribe to:
Post Comments (Atom)
0 Response to Creating country specific linear and quadratic time trends
Post a Comment