r_squared Function

public function r_squared(x, xm, err) result(rst)

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:

Arguments

Type IntentOptional 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.

Return Value real(kind=real64)

The result.


Contents