BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
orchid_sugar
Fluorite | Level 6

This is my first time using PROC GENMOD or hierarchical regression:

 

proc genmod data=Procedure descending;
	class asa3lev (ref="1") gender (ref="F") pay_cat (ref="01") pls_abbr (ref="ENG") race_grp (ref="1") orgID;
	model Event(event="1") = MedAff01 ageAtProc_10 anesthesia01 asa3lev BMI_val30 BMI_val2530 closure01 diabetes01 numBeds01 
						     procDurationMin_10 scope01 swClass01 trauma01
						     gender homeless pay_cat pls_abbr race_grp HPI_hpl_percentile HPI_pt_percentile
						     /link=logit dist=bin;
	repeated subject=orgID;
run;


I got an following error:

NOTE: Class levels for some variables were not printed due to excessive size.
NOTE: PROC GENMOD is modeling the probability that Event='1'.
NOTE: Algorithm converged.
WARNING: The generalized Hessian matrix is not positive definite. Iteration will be
terminated.
ERROR: Error in parameter estimate covariance computation.
ERROR: Error in estimation routine.

 

I don't know how to make this work or understand what this error means...

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

Convergence problems are quite common with models fit by iterative optimization methods such as maximum likelihood or GEE (as in this case) and such problems can happen in many possible ways which depend on the data and model. Convergence of models fit by iterative methods can never be guaranteed. The cause in any particular case cannot typically be determined from examining the model specification or data. A solution often must be found by experimentation. The most helpful strategy is usually to simplify the model (that is, reduce the number of model parameters) in some acceptable way such as by removing higher-order effects such as interactions, removing predictors, or by dropping or merging categories of CLASS variables. In general, the more parameters there are in the model, the more likely convergence problems become.

 

In categorical response models like this, sparseness of the data is common and can cause various fitting errors, though this is not the only possible cause. Generally, as model complexity increases and sample size decreases, the problem becomes more sparse and more likely to result in convergence problems. So again, model simplification is generally required. Starting with a simple model and adding variables as they can be supported is often a good strategy.

 

Note that GEE models can also be fit in the newer PROC GEE using similar syntax. You could try it since any variation in the fitting algorithm of an iterative method like GEE can potentially affect convergence. PROC GEE is a newer procedure specifically for fitting the GEE model and is the recommended procedure when fitting that model. It adds support for nominal multinomial response data and data that are missing at random and might perform better in some respects. 

View solution in original post

2 REPLIES 2
JosvanderVelden
SAS Super FREQ
A good introduction to proc genmod is this 'old' paper: https://www.lexjansen.com/nesug/nesug99/po/po140.pdf
StatDave
SAS Super FREQ

Convergence problems are quite common with models fit by iterative optimization methods such as maximum likelihood or GEE (as in this case) and such problems can happen in many possible ways which depend on the data and model. Convergence of models fit by iterative methods can never be guaranteed. The cause in any particular case cannot typically be determined from examining the model specification or data. A solution often must be found by experimentation. The most helpful strategy is usually to simplify the model (that is, reduce the number of model parameters) in some acceptable way such as by removing higher-order effects such as interactions, removing predictors, or by dropping or merging categories of CLASS variables. In general, the more parameters there are in the model, the more likely convergence problems become.

 

In categorical response models like this, sparseness of the data is common and can cause various fitting errors, though this is not the only possible cause. Generally, as model complexity increases and sample size decreases, the problem becomes more sparse and more likely to result in convergence problems. So again, model simplification is generally required. Starting with a simple model and adding variables as they can be supported is often a good strategy.

 

Note that GEE models can also be fit in the newer PROC GEE using similar syntax. You could try it since any variation in the fitting algorithm of an iterative method like GEE can potentially affect convergence. PROC GEE is a newer procedure specifically for fitting the GEE model and is the recommended procedure when fitting that model. It adds support for nominal multinomial response data and data that are missing at random and might perform better in some respects. 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 2 replies
  • 892 views
  • 2 likes
  • 3 in conversation