BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

Here is the full example in the documentation with the ODS OUTPUT statement added and a PROC PRINT step which shows the contents of the created data set. Try that and you should get the same basic display from PROC PRINT as from PROC LOGISTIC.

data vaso;
   length Response $12;
   input Volume Rate Response @@;
   LogVolume=log(Volume);
   LogRate=log(Rate);
   datalines;
3.70  0.825  constrict       3.50  1.09   constrict
1.25  2.50   constrict       0.75  1.50   constrict
0.80  3.20   constrict       0.70  3.50   constrict
0.60  0.75   no_constrict    1.10  1.70   no_constrict
0.90  0.75   no_constrict    0.90  0.45   no_constrict
0.80  0.57   no_constrict    0.55  2.75   no_constrict
0.60  3.00   no_constrict    1.40  2.33   constrict
0.75  3.75   constrict       2.30  1.64   constrict
3.20  1.60   constrict       0.85  1.415  constrict
1.70  1.06   no_constrict    1.80  1.80   constrict
0.40  2.00   no_constrict    0.95  1.36   no_constrict
1.35  1.35   no_constrict    1.50  1.36   no_constrict
1.60  1.78   constrict       0.60  1.50   no_constrict
1.80  1.50   constrict       0.95  1.90   no_constrict
1.90  0.95   constrict       1.60  0.40   no_constrict
2.70  0.75   constrict       2.35  0.03   no_constrict
1.10  1.83   no_constrict    1.10  2.20   constrict
1.20  2.00   constrict       0.80  3.33   constrict
0.95  1.90   no_constrict    0.75  1.90   no_constrict
1.30  1.625  constrict
;
proc logistic data=vaso;
   model Response=LogRate LogVolume/influence;
   ods output influence=in;
run;
proc print label; run;

View solution in original post

14 REPLIES 14
StatDave
SAS Super FREQ

All of those statistics can be requested in the OUTPUT statement which will put them into a data set. For example, this will save the the DFBeta values in data set MyInf:

output data=MyInf dfbeta=_all_;

See the description of the OUTPUT statement in the LOGISTIC documentation for details. 

Or you can save all of them into a data set with this statement:

ods output influence=MyInf;

See this note on saving results from any procedure in a data set. 

timothymbanks
Calcite | Level 5

Thanks for your reply but that only gives me output for the variables in my model. What I am looking for is the Influence statistics generated from the influence option in proc logistic. I want the output shown on page 5938 Chapter 76: The LOGISTIC Procedure 15.1.

StatDave
SAS Super FREQ
The ODS OUTPUT statement I showed saves all of the influence statistics like how the INFLUENCE option displays them.
timothymbanks
Calcite | Level 5

Thanks so much for your help thus far. I am getting output but not like the output shown on page 5938 Chapter 76: The LOGISTIC Procedure 15.1. That's the output I need for my analysis.

 

StatDave
SAS Super FREQ
I'm afraid a page number does not help me locate what you are looking at. Please refer to the title of the example or section of the LOGISTIC documentation you are referring to.
timothymbanks
Calcite | Level 5
Hi,
The example is in the Logistic Procedure 15.1. The output example of the Influence statistics in on page # 5938, the example shown is Output 76.6.2 Regression Diagnostics from the INFLUENCE Option.
StatDave
SAS Super FREQ
That is the example titled "Logistic Regression Diagnostics" which is what I assumed you were looking at and is why I suggested using the ODS statement: ods output influence=MyInf; . The resulting data set (MyInf) has all of the same columns of values as the displayed output that you refer to. So, I don't understand how that doesn't provide what you want.
timothymbanks
Calcite | Level 5

Hi StatDave,

I really appreciate you going the extra mile to help. For some reason I am not getting that output in the output dataset as shown in the Logistic Procedure 15.1 on page 5938 Output 76.6.2 Regression Diagnostics from the INFLUENCE Option. Once again I appreciate your help. 

timothymbanks
Calcite | Level 5

Hi,

Here is the code example.

 

 

ods output Influence = myinf; 'Not getting same output in an output dataset as shown in Logistic Procedure 15.1 page 5938';
ods graphics on;
proc logistic data = xxx.xxx ;
model purch_ind (event = '1') = 'Not Real Variables'
a
b
c
d
e
f
g
/ influence aggregate scale = none;
/*output out = MyInf dfbeta =_all_;*/
run;
ods graphics off;

StatDave
SAS Super FREQ

Here is the full example in the documentation with the ODS OUTPUT statement added and a PROC PRINT step which shows the contents of the created data set. Try that and you should get the same basic display from PROC PRINT as from PROC LOGISTIC.

data vaso;
   length Response $12;
   input Volume Rate Response @@;
   LogVolume=log(Volume);
   LogRate=log(Rate);
   datalines;
3.70  0.825  constrict       3.50  1.09   constrict
1.25  2.50   constrict       0.75  1.50   constrict
0.80  3.20   constrict       0.70  3.50   constrict
0.60  0.75   no_constrict    1.10  1.70   no_constrict
0.90  0.75   no_constrict    0.90  0.45   no_constrict
0.80  0.57   no_constrict    0.55  2.75   no_constrict
0.60  3.00   no_constrict    1.40  2.33   constrict
0.75  3.75   constrict       2.30  1.64   constrict
3.20  1.60   constrict       0.85  1.415  constrict
1.70  1.06   no_constrict    1.80  1.80   constrict
0.40  2.00   no_constrict    0.95  1.36   no_constrict
1.35  1.35   no_constrict    1.50  1.36   no_constrict
1.60  1.78   constrict       0.60  1.50   no_constrict
1.80  1.50   constrict       0.95  1.90   no_constrict
1.90  0.95   constrict       1.60  0.40   no_constrict
2.70  0.75   constrict       2.35  0.03   no_constrict
1.10  1.83   no_constrict    1.10  2.20   constrict
1.20  2.00   constrict       0.80  3.33   constrict
0.95  1.90   no_constrict    0.75  1.90   no_constrict
1.30  1.625  constrict
;
proc logistic data=vaso;
   model Response=LogRate LogVolume/influence;
   ods output influence=in;
run;
proc print label; run;
timothymbanks
Calcite | Level 5
Spoiler
Hi StatDave,
Thanks once again for your help. It worked finally!!!. Don't know why it was not outputting before but I do get the results now. Thanks a million,

Timothy

Reeza
Super User

Your reference numbers (15.1) and page numbers don't align as we don't have whatever book you're using. Can you link to the reference in the online documentation. 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_logistic_toc.htm

 

Or whatever version of SAS/STAT you have. 

 

timothymbanks
Calcite | Level 5

Hi Reeza,

Thanks for your willingness to help, but I think I got it now resolved based on StatDave's post. Regarding your reply it is the SAS/STAT 15.1 User's Guide The Logistic Procedure  downloaded from the SAS procedures. The page is 5938, the example on that page is titled "Output 76.6.2 Regression Diagnostics from the INFLUENCE Option". 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 14 replies
  • 3440 views
  • 3 likes
  • 3 in conversation