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-2024.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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