Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use R programming 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 programming

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions

Question

6. Testing equipment that will be used in instruction.

Answered: 1 week ago