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

The variable "in_default" has the observations 0 and 1. In results, table "Proportion (risk) Difference Test" calculates for "in_default" equal to 0. Is there how to obtain this table for "in_default" equal to 1?

 

Follow the code I used:

 

proc freq data=test;

weight pd;

tables leaf*in_default / riskdiff(equal var=null);

run;

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @Thalitacosta,

 

You can add the COLUMN=2 riskdiff option

tables leaf*in_default / riskdiff(equal var=null column=2);

to tell SAS that you want the calculation for the other column (i.e., in_default=1). The default is column=1, which in your case corresponds to in_default=0.

View solution in original post

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @Thalitacosta,

 

You can add the COLUMN=2 riskdiff option

tables leaf*in_default / riskdiff(equal var=null column=2);

to tell SAS that you want the calculation for the other column (i.e., in_default=1). The default is column=1, which in your case corresponds to in_default=0.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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