Computes the R-squared value for a data set.
The R-squared value is computed by determining the sum of the squares of the residuals: The total sum of the squares: . The R-squared value is then: .
See Also:
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | x(:) |
An N-element array containing the dependent variables from the data set. |
||
real(kind=real64), | intent(in) | :: | xm(:) |
An N-element array containing the corresponding modeled values. |
||
class(errors), | intent(inout), | optional, | target | :: | err |
A mechanism for communicating errors and warnings to the caller. Possible warning and error codes are as follows. - FS_NO_ERROR: No errors encountered. - FS_ARRAY_SIZE_ERROR: Occurs if x and xm are not the same size. |
The result.