estimate_ols.m
function [b_est, v_est] = estimate_ols(y,X)
% estimate glm using OLS
b_est = pinv(X)*y;
residuals=y - X*b_est;
%v_est=sqrt(residuals'*residuals); % THIS IS WRONG - FIX IT
v_est=(y'*y - b_est'*X'*X*b_est)/(size(X,1)-size(X,2));

