Trying to conduct an analysis of the effect of the ACA on substance use treatment stratified by zipcode.
Dataset is primary care clinics (OSHPD_ID); primary care clinics with substance use services (subst_abuse) and their zip code location. There is data from 2008-2017 for each clinic (some existed in some years and not in others, in addition some had services in some years and not in others).
I am using PROC GENMOD with GEE for repeated measures. But I keep getting this error and am not sure what to do.
NOTE: Class levels for some variables were not printed due to excessive size.
NOTE: PROC GENMOD is modeling the probability that subst_abuse='1'.
WARNING: The negative of the Hessian is not positive definite. The convergence is questionable.
WARNING: The procedure is continuing but the validity of the model fit is questionable.
WARNING: The specified model did not converge.
WARNING: Negative of Hessian not positive definite.
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.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE GENMOD used (Total process time):
real time 0.10 seconds
cpu time 0.11 seconds
Code Below:
proc genmod data=PCC_combo desc;
class
OSHPD_ID
subst_abuse (ref="0")
ACA (ref="0")
FAC_ZIPCODE
/param=ref ref=first;
;
model subst_abuse=ACA FAC_ZIPCODE
/ dist=binomial link=logit;
repeated subject=OSHPD_ID / type=exch;
estimate 'ACA Effect' ACA 1-1/EXP;
run;
I had a quick look at your code and Substance Abuse is specified as a nominal explanatory variables because it is in your CLASS statement:
class subst_abuse (ref="0")
Then, in your MODEL statement, Substance Abuse is specified as a response variable:
model subst_abuse=
Your model is not correctly specified. You should remove Substance Abuse from the CLASS Statement and use it this way in the MODEL Statement:
model subst_abuse(event='0')=
Cheers!
Sylvain
It is always a good idea not to include the response variable on the CLASS statement in GENMOD, but I do not think that is causing the issue. The issue is related to the first set of WARNING messages.
For a logistic model this is usually indicative of an issue that is commonly referred to as separation. What this is and what to do about it can be found in the discussion of this usage note. I suspect that the issue is related to using Zip codes as a predictor and may require that you collapse some of the Zips into related categories.
Very good point! Here is a reference:
"Collapsing Levels of Predictor Variables for Logistic Regression
and Weight of Evidence Coding"
https://www.mwsug.org/proceedings/2012/SA/MWSUG-2012-SA03.pdf
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.