Hi!
How would i test for an association between a variable and just 1 level of another variable?
I only have the 2x2 table.
I have the following code for testing between two variables. Thanks for any help!
DATA PBP2;
DO a=1 TO 2;
DO b=1 TO 2;
INPUT count @@;
OUTPUT;
END;
END;
CARDS;
146 54 159 41
;
RUN;
PROC FREQ;
TITLE6 "Output" ;
WEIGHT count;
TABLES a*b /CHISQ;
RUN;
Hi!
How would i test for an association between a variable and just 1 level of another variable?
I only have the 2x2 table.
I have the following code for testing between two variables. Thanks for any help!
DATA PBP2;
DO a=1 TO 2;
DO b=1 TO 2;
INPUT count @@;
OUTPUT;
END;
END;
CARDS;146 54 159 41;
RUN;
PROC FREQ;
TITLE6 "Output" ;
WEIGHT count;
TABLES a*b /CHISQ;
RUN;
@iressa131 wrote:
Hi!
How would i test for an association between a variable and just 1 level of another variable?
I only have the 2x2 table.
I am not sure what you mean by that type of test? What exactly would you be testing for? In your example which level of which variable are you testing against in the other?
Note that your code does not run as posted.
The CARDS and DATALINE statements must 1) have the Cards or datalines as the only statement on one line of code and 2) the ; or ;;;; in the case of Cards4 or equivalent must be on a line by itself, not at the end or a row of data.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.