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
Cannot use cd within programsHello, I am having problems with the following code (for example). As you can see, the cd command do…
How to create a variable that replaces the current observation's value with the last value based on variying criteriaDear all, I am working with a dataset about economic activities in Brazil such as the one below (go…
marginalized zero inflated modeling using STATAI have STATA 14 and I was informed that if I purchase STATA 16 I can now do marginalized zero inflat…
Repeated measures linear regression model with turkey adjustment for multiple comparisonsDear statalisters, I have a panel data I set the data like this xtset c_op_id visit panel variable: …
Comparing means across multiple groups using svy commandsI am looking to test for differences in means between three groups. Normally I would just run a onew…
Subscribe to:
Post Comments (Atom)
0 Response to Creating country specific linear and quadratic time trends
Post a Comment