Desktop productivity for business analysts and programmers

Why won't my PROC LOGISTIC model converge using count data and dummy variables?

Accepted Solution Solved
Reply
Contributor
Posts: 50
Accepted Solution

Why won't my PROC LOGISTIC model converge using count data and dummy variables?

I am trying to run PROC LOGISTIC in order to model the incidence of a disease (cases per 100k people) as a function of birthing order and age of the mother at time of birth.

I have included a table below to illustrate the structure of my data.  Please note that the re-coded variables at the far right (p100k, mage1, bdisorder1) are the variables that will be used in the model.

obs              maternal age              Birth Ord     Outcome count               Total subjects          cases per 100k people (p100k)      mage1   bdisorder1   

120-24112832946238.85100
220-24215232673546.52110
320-2437117568240.41420
425-2915411498746.96201
525-29211220869253.66811
625-29310120706048.77821
730-3414139473103.86802
830-342798322494.92512
930-34310911731292.91522
1035-3913814202267.56803
1135-3928928478312.52213
1235-3939945015219.92723
1340+1223046722.25904
1440+2445381817.69214
1540+3838654959.09424

So here is the program I am trying to run:

PROC LOGISTIC DATA=WORK.DATASET DESCENDING;

  FREQ COUNT;

  CLASS mage1 (REF="0") bdisorder1 (REF="0") / PARAM=REF;

  MODEL p100k = mage1 bdisorder1 / LINK = LOGIT AGGREGATE DETAILS ALPHA=0.05;

  TITLE1 "Main Effects Model - PROBLEM 1";

RUN;

Since I've recoded the mage1 and bdisorder1 variable to have my referent categories as zero instead of one I'm pretty sure I don't need the reference indicators in my class statement.  I'm trying to use dummy variables for these two inputs which is what I think I'm doing with the class statement.  Unfortunately my model won't converge and I keep getting the following warning:  "WARNING: The information matrix is singular and thus the convergence is questionable.  Try specifying a larger SINGULAR= value."

Is it that my data becomes too highly stratified if I try to use dummy variables for both of my inputs? 

Any help/thoughts on this topic is greatly appreciated.


Accepted Solutions
Solution
‎11-12-2012 08:43 PM
Valued Guide
Posts: 2,111

Re: Why won't my PROC LOGISTIC model converge using count data and dummy variables?

When using aggregate data, you need to specify the model as

MODEL  events/trials = <effects> </ options> ;

so something like

MODEL outcome count/total subjects = mage1 bdisorder1/....

is called for.  RTFM.

View solution in original post


All Replies
Solution
‎11-12-2012 08:43 PM
Valued Guide
Posts: 2,111

Re: Why won't my PROC LOGISTIC model converge using count data and dummy variables?

When using aggregate data, you need to specify the model as

MODEL  events/trials = <effects> </ options> ;

so something like

MODEL outcome count/total subjects = mage1 bdisorder1/....

is called for.  RTFM.

Respected Advisor
Posts: 4,608

Re: Why won't my PROC LOGISTIC model converge using count data and dummy variables?

Two problems are obvious in your code. 1) the column names are inverted for your dummy variables. But that would not affect convergence. 2) The MODEL statement should use the event/trial syntax : 

MODEL outcomeCount / totalSubjects = mage1 bdisorder1 / LINK = LOGIT DETAILS ALPHA=0.05;

That might be enough to solve your problem.

PG

PG
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 1430 views
  • 3 likes
  • 3 in conversation