Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Adding and interpreting covariates in proc genmod (NB) model?

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 10-30-2015 10:33 AM
(2121 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You add variables to the model statement, but if you have repeated measures you may need to use a different type of statistical model...

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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 🙂

**Available on demand!**

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

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.