BookmarkSubscribeRSS Feed
gretaolsson
Calcite | Level 5

Hi,


I want to execute Exact logistic regression on a sample with a continuous variable. The sample size is 100 and below I show an extract from the data:

 

 

"","num","y","x"
"1",1,1,0.242106882663965
"2",1,0,-1.0215795935404
"3",1,1,-0.166510155016807
"4",1,0,-0.979868182931502
"5",1,1,0.078228780249738
"6",1,0,-0.37946718709135
"7",1,1,2.22519466020747
"8",1,0,0.0303031993682403
"9",1,0,-1.82711480734735
"10",1,0,1.1355902983012

I use the following code: 

 

 

proc import out = filename
          file = "/folders/myfolders/sasuser.v94/Btest.csv"
          dbms = CSV
          replace;
run;

data want;
  set filename;
  sampleid=ceil(_n_/100);  /* Assign sampleid as record blocks of 10 */  
run;


proc logistic data=want desc;
  by sampleid;
  model y = x;
  exact x / estimate = both;
run;

 

(The beginning of the code I have because later on I want to have a csv file with several samples to be analyzed.)

 

And I get the following message:

An exception was thrown while sending a packet to the peer. 
What am I doing wrong?

1 REPLY 1
Ksharp
Super User

Try EXACTONLY option.

 

proc logistic data=want exactonly desc;
  by sampleid;
  model y = x;
  exact x / estimate = both;
run;

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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
  • 1 reply
  • 1642 views
  • 1 like
  • 2 in conversation