Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started