BookmarkSubscribeRSS Feed
erikhendrickson
Calcite | Level 5

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;

 

3 REPLIES 3
SylvainTremblay
SAS Employee

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

SAS_Rob
SAS Employee

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.

https://support.sas.com/kb/22/599.html 

SylvainTremblay
SAS Employee

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 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 2376 views
  • 3 likes
  • 3 in conversation