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 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 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
  • 1099 views
  • 1 like
  • 3 in conversation