BookmarkSubscribeRSS Feed
Ivy
Quartz | Level 8 Ivy
Quartz | Level 8

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 

1 REPLY 1
SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 3236 views
  • 0 likes
  • 2 in conversation