I'm trying to determinate if years of residence have an effect in BMI, so I in order to compare my first model (only for foreign people), I want to create a model for local people + foreign people. I want to interact a dummie call foreign that indicates 0 for local and 1 for foreign. The interaction consist of a variable call "year" with the local people (the years is a way to indicate how many years they have been residing supposing that they havent moved abroad), and the foreign one with a variable call "years of residence".
Until now I did this:
gen local = (1-foreign)
reg BMI foreign#c.years_of_residence local#c.year
But I'm failing. Any advise?
thanks
Until now I did this:
gen local = (1-foreign)
reg BMI foreign#c.years_of_residence local#c.year
But I'm failing. Any advise?
thanks
Comment