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

Hello, 

 

I would like to know to combine 2 variables into one. For instance, if we are talking about admission to colleges, one variable would be 'undergrad' and the other would be 'masters'. I want to combine all the yes and no's from 'undergrad' and 'masters' into one variable called 'admittance'. I then want to use 'admittance' to do a bi-variate comparison or logistical regression with another variable say 'gender' how would I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

What you said doesn't really seem to answer the question. We need to know your logic in determining whether Admittance gets a YES or a NO.

 

There are four cases:

 

Undergrad        Masters          Admittance
YES                  NO                 ???
YES                  YES                ???
NO                    YES               ???
NO                    NO                ???

Tell us what value you want for Admittance in each of the four cases.

 

 

--
Paige Miller

View solution in original post

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Can you tell us what values 'admittance' should have when we combine the YES and NO values in 'undergrad' and 'masters'?

--
Paige Miller
UGAstudent
Calcite | Level 5

I would like 'yes' and 'no' for admittance results as well

ballardw
Super User

Example Input;

Desired example output.

For all possible cases of your variables.

Also do you want a numeric or character result?

UGAstudent
Calcite | Level 5

I would like 'yes' and 'no' for admittance results as well? w\Would there be an issue for a dis-coordinate  input?Say 'yes' to undergrad and no to 'masters'?

PaigeMiller
Diamond | Level 26

What you said doesn't really seem to answer the question. We need to know your logic in determining whether Admittance gets a YES or a NO.

 

There are four cases:

 

Undergrad        Masters          Admittance
YES                  NO                 ???
YES                  YES                ???
NO                    YES               ???
NO                    NO                ???

Tell us what value you want for Admittance in each of the four cases.

 

 

--
Paige Miller
UGAstudent
Calcite | Level 5
Undergrad        Masters          both Admittance
YES                  NO                 ???
YES                  YES                Yes
NO                    YES               ???
NO                    NO                ???

in this case, 'admittance' needs to only represent people who got into both undergrad and masters  

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1332 views
  • 1 like
  • 3 in conversation