wls_hat_matrix function

Create the "hat matrix" for weighted least squares regression