I'm modelling the behaviour of two variables with a linear regression. Since I saw (and believe) there is a multiplicative behaviour I transformed the dependent and independent variables taking the log.
fit <- lm(log_GDP ~ log_population, data=df) par(mfrow = c(2, 2)) plot(fit)
From the second graph it seems that the residuals are not Normally distributed. Moreover, from the third graph we can see that there is no homogenity.
This is confirmed by:
library(gvlma ) gvmodel <- gvlma(fit) summary(gvmodel) Value p-value Decision Global Stat 63.543 5.216e-13 Assumptions NOT satisfied! Skewness 8.617 3.330e-03 Assumptions NOT satisfied! Kurtosis 49.484 2.000e-12 Assumptions NOT satisfied! Link Function 3.163 7.534e-02 Assumptions acceptable. Heteroscedasticity 2.279 1.311e-01 Assumptions acceptable.
Since I believe it is possible to remove some outliers to better fit this behaviour, I removed some of them
mod <- lm(log_GDP ~ log_population, data=df[-c(190,59, 228, 47, 221,48),]) gvlma <- gvlma(mod) summary(gvlma) Value p-value Decision Global Stat 5.36084 0.25223 Assumptions acceptable. Skewness 2.86748 0.09039 Assumptions acceptable. Kurtosis 0.82106 0.36487 Assumptions acceptable. Link Function 1.65349 0.19848 Assumptions acceptable. Heteroscedasticity 0.01882 0.89089 Assumptions acceptable.
Great! Let's see them:
From the third graph I can still see a pattern. Homoscedasticity!! Should I do something (and what?)? Are the assumptions valid?
If everything is all right, why should I specify Instrument Variables?