doe_compare_models Function

public function doe_compare_models(mdl1, mdl2, x, y) result(comp)

Compares two DOE models using the same data set.

The RSS of each model is computed by evaluating it at x and comparing to y. Model 1 is the "full" model and model 2 is the "reduced" model, which is assumed to be nested within the full model. With and parameters (count(map)), the residual degrees of freedom are , and the F-test is

with the p-value taken from the upper tail of the F-distribution with degrees of freedom. The difference is flagged as significant if p < 0.05. If the full model does not have more parameters than the reduced model, or has no residual degrees of freedom, the comparison is invalid and is reported with F = 0, p = 1, and an explanatory conclusion. If the full model fits perfectly, F is huge and p is zero.

Arguments

Type IntentOptional Attributes Name
class(doe_model), intent(in) :: mdl1

The full model.

class(doe_model), intent(in) :: mdl2

The reduced model.

real(kind=real64), intent(in), dimension(:,:) :: x

The M-by-N matrix containing the M values of each of the N factors at which to evaluate both models.

real(kind=real64), intent(in), dimension(:) :: y

The M-element array containing the observed responses. This array must have the same number of rows as x.

Return Value type(doe_comparison_result)

A doe_comparison_result object containing the comparison results.