Programming the statistical procedures from SAS

Proc genmod - how to resolve error messages

Posts: 0

Proc genmod - how to resolve error messages

I have a data set that contains ~180,000 records, depicting the followup time from study recruitment until hospitalisation over a 10 year period. Hence, there are multiple records per person - each person-specific record restarts counting person time at risk from the time of release from one hospitalisation until the next hospitalisation (or study end). I am trying to determine whether the rate of hospitalisation (hosp_flag = 0/1) varies by body mass index after adjusting for age. Here's my syntax for calculating the rate of hospitalisation.

ODS OUTPUT ParameterEstimates = results;
CLASS bmi_cat id;
MODEL hosp_flag = bmi_cat age_year / DIST = poisson LINK = log OFFSET = logpyr TYPE3 SCALE = deviance WALD;
REPEATED subject = id / TYPE = AR;

The syntax is running but generating the following errors, which I think are coming from the TYPE = AR option:

ERROR: Error in computing inverse link function.
ERROR: Error in parameter estimate covariance computation.
ERROR: Error in estimation routine.

The same errors arise if I specify TYPE as exchangeable rather than autorgressive. Does someone know what I am doing wrong?

Many thanks in advance.
Frequent Contributor
Posts: 77

Re: Proc genmod - how to resolve error messages

Hi Persistence,

Hmmm... I suspect the problem is not in TYPE=AR option but in your response variable hosp_flag. It takes values 0 or 1 i.e. it's dichotomous, yet you say it's the rate of hospitalization and you model it with Poisson distribution... I would think that either different response variable should be used or different DIST and LINK...
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation