Programming the statistical procedures from SAS

Using user-defined matrix in PROC GENMOD

New Contributor bno
New Contributor
Posts: 2

Using user-defined matrix in PROC GENMOD


I have over 300 clusters, where sizes of clusters varied from 1 (there are many totally independent subjects) to 250 of individuals with total of over 5000 individuals. I have already obtained correlation matrix between indiviuals for each of the clusters. I would like to used PROC GENMOD in SAS and use my own correlation structure instead of using say, TYPE = EXCH for each cluster in the REPEATED statement. How would I specify these several matrices for these clusters? Also, how do I make sure that the SAS picks up the correct correlation value between any two individuals from my data in the GENMOD analysis?

There is an option for userdefined matrix in SAS for a single matrix,

"For example, you can specify a fixed correlation matrix with the following option: TYPE=USER( 1.0  0.9  0.8  0.6           0.9  1.0  0.9  0.8           0.8  0.9  1.0  0.9           0.6  0.8  0.9  1.0 )". So I have also obtained a single correlation matrix between all individuals without clustering them. Is there any way to specify user defined correlation matrix of all individuals in GENMOD procedure without spefifying SUBJECT = clustering variable in REPEATED statement? In this example, matrix elements are typed, but in my problem matrix is so large that is it impossible to type each element. Does something like  TYPE = USER(mydata.txt) work?

Many thanks in advance.


SAS Employee
Posts: 306

Using user-defined matrix in PROC GENMOD

I'm afraid it's not possible to specify a data set as the TYPE=USER matrix in PROC GENMOD.  The important thing about the GEE model that GENMOD fits when you specify the REPEATED statement is that the method is robust to the choice of correlation structure.  So, even if you select a structure that doesn't exactly match the true structure, you still get statistically consistent estimators.  It is usually sufficient to pick a structure that is roughly similar to the structure you have.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation