Steps for Completion:
- Make a subset of the loan dataset by using some of the following variables:
df3_1 <- df3[,c("funded_amnt","annual_inc","dti","inq_last_6mths",
"total_acc","total_pymnt_inv")]
- Use cor for the preceding loan data subset, and then choose two highly correlated variables in the loan dataset. Use pairs, as follows:
total_rec_prncp and total_pymnt_int
funded_amnt,total_pymnt_inv
- Make a scatterplot for the preceding pairs for grade A, then fit a linear regression model.
- Determine what are the correlations of the preceding pairs.
Outcome:
Answer to step 4: The correlations are as follows:
- 93%
- 85%