Programming the statistical procedures from SAS

PROC GENMOD

Reply
Contributor Ivy
Contributor
Posts: 73

PROC GENMOD

Hello, 

 

May you help with the GENMOD procedure?  Thank you . 

 

proc genmod data= noshare descend;
class PatientID gender region race ethnicity PracticeSize LineNumber DrugName num_drugs ;
model y =age gender region race ethnicity weight_kg BSA_mm PracticeSize LineNumber num_admin_line DrugName num_drugs /
dist=bin link=logit noscale;
repeated subject=PatientID/type=un ;
run;

 

 

proc genmod data= noshare descend;
class PatientID gender region race ethnicity PracticeSize LineNumber DrugName num_drugs ;
model y =age gender region race ethnicity weight_kg BSA_mm PracticeSize LineNumber num_admin_line DrugName num_drugs /
dist=bin link=logit noscale;
repeated subject=PatientID/type=un ;
run;

 

 

I have a data set with mutiple observations per patinets , observerded at different time point for different patient, with "Y/N" response. There are 8000 patients with  60000 observations at mutiple centers.  My questions:

 

1. Should GENMOD be used for this correlated data ?  Centers , patients id are correlated. 

2.  What the error means after I ran the above procedure ?  Any way I can fix it ?

 

131 proc genmod data= noshare descend;
132 class PatientID gender region race ethnicity PracticeSize_Overall LineNumber DrugName
132! num_drugs ;
133 model y =age gender region race ethnicity weight_kg BSA_mm PracticeSize_Overall LineNumber
133! num_admin_line DrugName num_drugs /
134 dist=bin link=logit noscale;
135 repeated subject=PatientID/type=un ;
136 run;

NOTE: Class levels for some variables were not printed due to excessive size.
NOTE: PROC GENMOD is modeling the probability that y='1'.
NOTE: Algorithm converged.
WARNING: The number of response pairs for estimating correlation is less than or equal to the
number of regression parameters. A simpler correlation model might be more appropriate.
NOTE: The working correlation has been ridged with a maximum value of 8.805289195 to avoid
singularity.
ERROR: Error in computing the variance function.
ERROR: Error in parameter estimate covariance computation.
ERROR: Error in estimation routine.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE GENMOD printed pages 129-135.
NOTE: PROCEDURE GENMOD used (Total process time):
real time 3.38 seconds
cpu time 3.37 seconds

NOTE: Remote submit to D.__4018 complete

 

Thank you very much,

Ivy 

Respected Advisor
Posts: 2,655

Re: PROC GENMOD

The warning comes about from the fact that you have more levels in all of your independent variables than you have observations.  You will have to reduce your model in some fashion--in particular, fitting an unstructured working covariance leads to n*(n-1)/2 parameters to estimate in addition to all of the independent parameters.

 

On a different note, if you wish to accommodate the clustering implied by site and patient, you should consider using PROC GLIMMIX, with those as random effects.  There is a lot of material both here and elsewhere on the web regarding good code for that approach.  Still, the key is identifying a tractable model.

 

Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 161 views
  • 0 likes
  • 2 in conversation