I want to write a stata code to solve the following:
Pre-treatment state GDP growth rate interacted with linear birth cohort trend.
Say my treatment starts in some year X, I have the preceeding 10 years average GDP growth rate for each state (variable name: GDPgr) in my data. I have the variable birth year and birth month.
I constructed the birth cohort as: gen birth_cohort = ym(birthyear, birthmonth)
Now, to interacted this birth cohort linear trend with my GDP growth rate in each state, how do I write the code?
Is it, i.GDPgr#c.birthcohort
But if I use this, then stata says " factor variables may not contain noninteger values".
Then if I use, c.GDPgr#c.birthcohort - does that make sense to find out "Pre-treatment state GDP growth rate interacted with linear birth cohort trend."?
OR it should be, c.GDPgr#i.birthcohort?
Can anyone help me understand this? And how to interpret this? What is the underlying meaning?
Pre-treatment state GDP growth rate interacted with linear birth cohort trend.
Say my treatment starts in some year X, I have the preceeding 10 years average GDP growth rate for each state (variable name: GDPgr) in my data. I have the variable birth year and birth month.
I constructed the birth cohort as: gen birth_cohort = ym(birthyear, birthmonth)
Now, to interacted this birth cohort linear trend with my GDP growth rate in each state, how do I write the code?
Is it, i.GDPgr#c.birthcohort
But if I use this, then stata says " factor variables may not contain noninteger values".
Then if I use, c.GDPgr#c.birthcohort - does that make sense to find out "Pre-treatment state GDP growth rate interacted with linear birth cohort trend."?
OR it should be, c.GDPgr#i.birthcohort?
Can anyone help me understand this? And how to interpret this? What is the underlying meaning?
Comment