Variance, Covariance Matrix, Linear Regression, Standard Error, Confidence Interval.
calculate s², which is the variance of the residuals. It is calculated using the formula (e’e)/(n-k) as follows: e=np.array(olsr_results.resid) #reshape it to (50 x 1) e=e.reshape(e.shape[0],1) e_prime = np.transpose(e) resid_variance = np.matmul(e_prime,e)/(50-3)[0] print('Variance of