Question: Use R program Problem 1. [10 points] Define a function named loan_offer to admit or reject loan applications, based on the decision tree below. Please

Use R program

Use R program Problem 1. [10 points] Define a function named loan_offer

Problem 1. [10 points] Define a function named loan_offer to admit or reject loan applications, based on the decision tree below. Please note that the income range of $40K$80K contains its bounds (\$40K and $80K ). The loan_offer function needs to satisfy the following requirements: - Arguments: - A numeric variable that shows the applicant's income. - A logical variable, which indicates whether an applicant has a criminal record (i.e., c_record = TRUE) or not (i.e., c_record = FALSE). - A numeric variable that shows number of years in present job. - Output: Return a categorical value of "Admit" or "Reject". - Validate your function for the following applicant: Your function must return "Reject" for an applicant with $40K income, no criminal record, and 3 years in present job

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!