Added R squared function

Added R squared function