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

Hi, I am running the following code 

ods listing close;
ods output FitStatistics = TempFit ParameterEstimates=TempEst NObs=TempNObs
RSquare=TempRSquare Classification=TempClass Association=TempAssoc ResponseProfile=TempResp;
proc logistic data=temp.temp_51101 DESCENDING;
model XYZ = AA BB CC DD EE /RSQUARE CTABLE pprob=(0.0 to 1 by 0.05);
run;

ods output close;
ods listing;
ods trace off;

 

and I get the log 

ERROR: The SAS System stopped processing this step because of insufficient memory.
NOTE: There were 5169 observations read from the data set WORK.TEMP_51101.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.69 seconds
cpu time 0.65 seconds

 

The database is not particularly large and I cannot believe that there is a memory issue. 

 

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

PROC LOGISTIC is intended for regression when the response variable is binary (although it also supports other categorical distributions.)

 

If you run PROC FREQ on your XYZ variable, you will see that it is a continuous variable with 5169 unique values. PROC LOGISTIC is trying to fit a cumulative logit model to this data.

 

In short, the distribution of XYZ is not appropriate for PROC LOGISTIC. You can try other procedures like PROC REG.

 

I don't know anything about your data, but if you run PROC UNIVARIATE on the response variable, you will see that Obs=4801 is an extreme outlier. I'd check to see if it was miscoded.

View solution in original post

6 REPLIES 6
Rick_SAS
SAS Super FREQ

Strange. The following call does the same compution on 5400 observations without difficulty for me. Can you run it?

 

Can you run your model on your data when you omit the CTABLE and PPROB= options?

 

data cars;
set sashelp.cars sashelp.cars sashelp.cars sashelp.cars sashelp.cars
    sashelp.cars sashelp.cars sashelp.cars sashelp.cars sashelp.cars
    sashelp.cars sashelp.cars sashelp.cars sashelp.cars sashelp.cars
    sashelp.cars sashelp.cars sashelp.cars sashelp.cars sashelp.cars;
where origin in ("USA" "Europe");
run;

proc logistic data=cars;
model origin = cylinders weight mpg_city mpg_highway invoice / RSQUARE CTABLE pprob=(0 to 1 by 0.05);
run;

PAlves
Calcite | Level 5

Hi, here it is:


320 proc logistic data=cars;
321 model origin = cylinders weight mpg_city mpg_highway invoice / RSQUARE CTABLE pprob=(0 to 1 by 0.05);
322 run;

NOTE: PROC LOGISTIC is modeling the probability that Origin='Europe'. One way to change this to model the probability that Origin='USA'
is to specify the response variable option EVENT='USA'.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: There were 5400 observations read from the data set WORK.CARS.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.04 seconds
cpu time 0.03 second

Rick_SAS
SAS Super FREQ

Great. The fact that you can run the example means that it is not a "lack of memory" problem.  My guess it that something is special/degenerate with your data, but I don't know what.  If you can attach the data, that would  help.

Rick_SAS
SAS Super FREQ

PROC LOGISTIC is intended for regression when the response variable is binary (although it also supports other categorical distributions.)

 

If you run PROC FREQ on your XYZ variable, you will see that it is a continuous variable with 5169 unique values. PROC LOGISTIC is trying to fit a cumulative logit model to this data.

 

In short, the distribution of XYZ is not appropriate for PROC LOGISTIC. You can try other procedures like PROC REG.

 

I don't know anything about your data, but if you run PROC UNIVARIATE on the response variable, you will see that Obs=4801 is an extreme outlier. I'd check to see if it was miscoded.

PAlves
Calcite | Level 5

I am so sorry for wasting your time. That was silly 🙂 

 

I had a typo in the macro that was generating that XYZ variable and I was overlooking the error. 

 

Sorry and thanks a million.

PA

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 6 replies
  • 4166 views
  • 0 likes
  • 2 in conversation