Programming the statistical procedures from SAS


Occasional Contributor
Posts: 7


Does proc GENMOD iterate only once when you use the option CORR=FIXED or CORR=USER in the REPEATED statement?
Regular Contributor
Posts: 171


Somehow, methinks that the question you ask is not the real question that you have. You are probably observing more than a single iteration and thinking "If I have specified a correlation structure, then why does the GENMOD procedure require k>1 iterations to fit the model? Shouldn't it use the specified correlation and return estimates immediately without iterating?"

Is that really the question that you are trying to address? If so, then consider fitting a simple logistic regression model in which observations do not have any correlation structure. Such a model will almost always require more than one iteration to complete. The code below demonstrates:

data test;
   do i=1 to 100;
      x = rannor(1234579);
      eta = -.3 + 0.7*x;
      p = 1 / (1 + exp(-eta));
      y = ranbin(1234579,1,p);

proc genmod data=test;
   model y = x / dist=bin itprint;

If the simple logistic regression model requires multiple iterations, then would you expect a GEE model in which you specify the working correlation matrix to fit in a single iteration?

If you specified the working correlation matrix and you specified that the response followed a normal distribution, then you would expect the GEE to go to the final solution in only a single iteration. For all other distributions, you would not expect to achieve the fit in a single iteration because the model is nonlinear with respect to the parameters expressing the mean function.
Occasional Contributor
Posts: 7


Let me try to clarify my question. I want to give GENMOD an initial working correlation matrix in the REPEATED statement, and I want it to update it using the GEE algorithm. Unfortunately, it seems that is I use the USER or FIXED options then GENMOD does not update the working correlation matrix.

If I use the autoregressive (AR) or unstructured (UNSTR) options in the REPEATED statement, then GENMOD would use the Pearson residuals and coefficients to estimate the working correlation matrix, recalculate the covariance of the parameter estimates, recalculate the coefficients, recalculate the Pearson residuals, recalculate the working correlation matrix, and so on until the convergence criterion was met. This means the working correlation matrix would change from one GEE iteration to the next. However, that does not happen when the USER or FIXED options is used.
SAS Employee
Posts: 304


That is correct -- GENMOD does not estimate/update the correlation matrix when TYPE=FIXED or USER is specified.
Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation