changed R squared calculation for gls method