BookmarkSubscribeRSS Feed
Hernan
Calcite | Level 5
Does proc GENMOD iterate only once when you use the option CORR=FIXED or CORR=USER in the REPEATED statement?
3 REPLIES 3
Dale
Pyrite | Level 9
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);
      output;
   end;
run;

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


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.
Hernan
Calcite | Level 5
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.
StatDave
SAS Super FREQ
That is correct -- GENMOD does not estimate/update the correlation matrix when TYPE=FIXED or USER is specified.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1589 views
  • 0 likes
  • 3 in conversation