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.
PROC GENMOD DATA = temp1;
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;
RUN;
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.