1
$\begingroup$

I am learning so bear with me.

Aim: I am trying to figure out if my data fit the criteria for multiple linear regression.

Context: My model has two numeric and four categoric variables.

kiva_model <- lm(lender_count ~
                   loan_usd+ #Numeric
                   sector+ #Categoric 11 levels
                   term_in_months+ #Numeric
                   borrower_genders+ #Categoric 5 levels
                   repayment_interval+ #Categoric 3 levels
                   country_code, #Categoric 59 levels
                    data=kiva_omit)

Sample size is 504,528.

I checked the correlation between the three numeric variables as follows:

enter image description here

loan_usd is a strong predictor or lender_count.

I have made plots to assess: a) Linearity of numerical variables b) nearly normal residuals c) constant variability.

The images show the before (above) and after (below) of outlier removal using cooks_distance<4/n.

I cannot figure out if this is acceptable enough to proceed with my analysis or if I have to further manipulate the data prior the final regression.

To summarise my main concerns:

  • Conical shape in term_in_months vs. residuals.
  • Slight S-shape in Normal probability plot.
  • Strong line in Residuals vs. predicted.

a) Linearity of numerical variables

enter image description here

enter image description here

b) Nearly normal residuals

enter image description here

c) Constant variability

Residuals vs. predicted

enter image description here

Absolute value of residuals vs. predicted

enter image description here

$\endgroup$
1
$\begingroup$

I am unable to see the images. Based on what you have mentioned, Conical shape between term_in_months(variable) and residuals implies violation of linearity. Try to use non linear relationship between target variable (lender_count) and term_in_months. for example: use some polynomial form of order 2,3 for term_in_months. Slight S-Shape may be ignored if it is not statistically significant.If your features(Variables) are correlated (causing multicollinearity), you can use Principal component analysis to decorrelate them. You can check all the assumptions by doing statistical test as well. for instance, Kolmogorov-Smirnov test and Anderson-Darling test are used for normality. For independents residuals, you can use Durbin-Watson test. You can check https://www.analyticsvidhya.com/blog/2016/07/deeper-regression-analysis-assumptions-plots-solutions/.

In nutshell, try to transform your data. Box-cox transformation may help you in resolving this.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.