Hi all, I am trying to create a weekly income variable that contains mean incomes of individuals depending on the year and their occupation. For this I am using the following code but it's returning an error. Would there be an alternative way to achieve this?
Code:
egen year_occ2010 = group(year occ2010) egen income = mean(inctot)/52 if (year =! 2012 & year =! 2017), by(year_occ2010) varlist not allowed r(101)
Comment