BookmarkSubscribeRSS Feed
wernie
Quartz | Level 8

Hi all,

 

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;
class area;
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;
run;

 

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.

3 REPLIES 3
Reeza
Super User
You add variables to the model statement, but if you have repeated measures you may need to use a different type of statistical model...
wernie
Quartz | Level 8

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? 

wernie
Quartz | Level 8

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...

 

Thanks again 🙂

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2122 views
  • 0 likes
  • 2 in conversation