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.

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