10-30-2015 10:33 AM - edited 10-30-2015 10:36 AM
Sorry if my terminology might not be right on point, but I am trying to add covariates into a negative binomial model to see if other factors might account for changes that were found in initial analyses. The overview is: I have 3 study areas with n cases for each study area for each year over a 17 year period. I am using the estimate statement to get a rate ratio to compare the slopes over time. The models are offset by the underlying population (logpop) to account for changes in pop over time. So, that code looked like this, with the area*period interaction being the outcome of interest:
proc genmod data=All;
model nsum=area period area*period / dist=NB link=log offset=logpop type3;
estimate "Area 1 v area 2*period" area*period 1 -1 0/exp e;
estimate "Area 2 v area 3*period" area*period 0 -1 1/exp e;
estimate "Area 1 v area 3*period" area*period 1 0 -1/exp e;
But, now we want to add in some covariates, so I have age, sex, proportion of population employed FT (which is a % of the population for each year), proportion in specific occupations, median income, etc. So I have 17 measures for each covariate for across the time period (e.g., 17 different measures of proportion employed - 1 for each year). When I try to add these variables in the 'class' statement and in the 'model' statement, I get errors about negative of Hessian or model did not converge. I don't know if this is the proper way to do it or how I should add in the covariates to see if they affect the area*period RRs of interest. Any help would be appreciated! Thanks
PS - I just saw in another post that continuous variables should not be included in the class statement, so unsure if that's part of what I'm doing wrong.
10-30-2015 12:07 PM
Thanks, Reeza. So if I have gross measures of employment, which are repeated for each age group and sex (i.e., each age group and sex for the year 2000 has the same proportion employed FT number for area 1, then each age group and sex for the year 2000 has the same proportion employed FT number for area 2, and so on), then which model should I be using? Would it still provide the RRs like I have with this model and the estimate statements?
10-31-2015 02:27 PM
When I remove those variables from the 'class' statement and only put them in the model statement, it runs and says algorithm converged, but the problem that I get is that area 1 v area 2*period gives an estimate and then the others says 'non-est'. I'm not sure what exactly makes it nonestimable or how to address that...