BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mconover
Quartz | Level 8

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Doc_Duke
Rhodochrosite | Level 12

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

2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12

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.

PGStats
Opal | Level 21

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

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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