Programming the statistical procedures from SAS

Read Access Violation in Task [Logistic]

Occasional Contributor
Posts: 17

Read Access Violation in Task [Logistic]

Hi all

I'm trying to analyse a finely-stratified nested case-control study, using proc logistic with a stratify condition. The data are 38 cases (scuba dives) made by 11 divers, Versus 159 controls (scuba dives made in the same place at the same time as at least one case) by 34 divers.

The strata are the dive location and time (dive number 1 to whatever, 44 I think from memory)

But.. when I run the program the log shows this:

217 proc logistic desc;
218 where TPCC=1;
219 class ExceedLimits Certification2 ;
220 MODEL ExceedLimits = Age Sex2 Certification2 NumYears TimeSinceLast maxd / SELECTION=B
220! hier=single DETAILS clodds=wald;
221 strata DiveNum;
222 RUN;

ERROR: Read Access Violation In Task [ LOGISTIC )
Exception occurred at (540E1BC7)
Task Traceback
Address Frame (DBGHELP API Version 4.0 rev 5)
540E1BC7 06B1EC00 saslogis:mcn_main+0x90BC7
5407C336 06B1ECEC saslogis:mcn_main+0x2B336
54065BA3 06B1ED78 saslogis:mcn_main+0x14BA3
5405B22F 06B1F0A0 saslogis:mcn_main+0xA22F
540D98F7 06B1FF88 saslogis:mcn_main+0x888F7
01232B02 06B1FFA0 sashost:Main+0xBE72
01236C10 06B1FFB4 sashost:Main+0xFF80
7C80B729 06B1FFEC kernel32:GetModuleFileNameA+0x1BA

NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 197 observations read from the data set WORK.PHD.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds

When I remove the stratum statement the logistic procedure works just fine. 195 of 197 dives are included and 2 not included due to missing values.

Anyone have any idea why it runs with no stratum statement but doesn't when I try conditional logistic regression? Could it be because two of the divers made 23 of the dives between them and the rest made just one or two dives each?

If so, maybe I should just go with an unconditional regression, and note that effects may be underestimated?


Peter Buzzacott
Western Australia
Occasional Contributor
Posts: 17

Re: Read Access Violation in Task [Logistic]

Posted in reply to PeterBuzzacott

Even though I suspect there is nothing wrong with importing the data from an Excel spreadsheet, because the conditional regression works if I change outcome variables, I inputed the data using "cards" and columns of values.

I got exactly the same error message and then when I deleted the strata statement the unconditional regression again worked fine.

I've checked and there isn't anything obviously unusual with the data, like all the strata have at least one case and one control in them, etc.

I've searched the Help file and can't find any reference to "Read Access Violation ...". Does anyone know what that means?

Trusted Advisor
Posts: 2,116

Re: Read Access Violation in Task [Logistic]

Posted in reply to PeterBuzzacott
I just searched SAS tech support for
"read access violation" logistic
and found a note (6731) that fits my original suspicion. You are running out of memory.

The strata creates a multiplier in the memory usage (see the "Computational Resources" section of the LOGISTIC documentation).
Occasional Contributor
Posts: 17

Re: Read Access Violation in Task [Logistic]

Thanks Doc@Duke

I thought you might be right so I loaded SAS onto my more powerful home PC, re-ran the regression and got the same error message, but then the guy I share a desk with asked me why I was including the strata variable in the class statement when, actually, the strata are the chronological order in which the data were collected and, so, are ordinal.

I took the strata variable DivNum out of the class statement and voila... it works.

Thanks again - at last... the end is in sight.

Peter Buzzacott
Final stage of a PhD
Ask a Question
Discussion stats
  • 3 replies
  • 2 in conversation