fstats_experimental_design Module



Contents


Interfaces

public interface doe_evaluate_model

  • private function doe_evaluate_model_1(nway, beta, x, map, err) result(rst)

    Evaluates the model of the following form.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(in) :: nway

    The number of interaction levels. Currently, this algorithm supports a maximum of three-way interaction.

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

    The model coefficients.

    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 the model.

    logical, intent(in), optional, target, dimension(:) :: map

    An optional array of the same size as beta that can be used to eliminate a parameter from the model (false), or keep a parameter in the model (true). If not supplied, all parameters will be assumed to be part of the model as if the array were filled with all true 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 beta and map are not properly sized relative to one another. - FS_MEMORY_ERROR: Occurs if there is a memory allocation error. - FS_INVALID_INPUT_ERROR: Occurs if nway is less than 1 or greater than 3.

    Return Value real(kind=real64), allocatable, dimension(:)

    The resulting M-element array.

  • private function doe_evaluate_model_2(mdl, x, err) result(rst)

    Evaluates the model of the following form.

    Arguments

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

    The model to evaluate.

    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 the model.

    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_MEMORY_ERROR: Occurs if there is a memory allocation error.

    Return Value real(kind=real64), allocatable, dimension(:)

    The resulting M-element array.


Derived Types

type, public ::  doe_model

A model used to represent a design of experiments result. The model is of the following form.

Read more…

Components

Type Visibility Attributes Name Initial
real(kind=real64), public, allocatable, dimension(:) :: coefficients

The model coefficients.

logical, public, allocatable, dimension(:) :: map

An array denoting if a model coefficient should be included as part of the model (true), or neglected (false).

integer(kind=int32), public :: nway

The number of interaction levels.

type(regression_statistics), public, allocatable, dimension(:) :: stats

Statistical information for each model parameter.


Functions

public function doe_fit_model(nway, x, y, map, alpha, err) result(rst)

Fits a Taylor series model to the provided data.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nway

The number of interaction levels.

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

The M-by-N matrix containing the M values of each of the N factors used to produce the results.

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

An M-element array containing the results from the M experiments.

logical, intent(in), optional, target, dimension(:) :: map

An optional array of the same size as beta that can be used to eliminate a parameter from the model (false), or keep a parameter in the model (true). If not supplied, all parameters will be assumed to be part of the model as if the array were filled with all true values.

real(kind=real64), intent(in), optional :: alpha

The significance level at which to evaluate the confidence intervals. The default value is 0.05 such that a 95% confidence interval is calculated.

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 y are not properly sized relative to one another. - FS_MEMORY_ERROR: Occurs if there is a memory allocation error. - FS_INVALID_ARGUMENT_ERROR: Occurs if nway is out of range, or if map is used to "turn off" all model parameters.

Return Value type(doe_model)

The resulting model.


Subroutines

public subroutine full_factorial(vars, tbl, err)

Computes a table with values scaled from 1 to N describing a full-factorial design.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: vars(:)

An M-element array containing the M factors to study.
Each of the M entries to the array is expected to contain the number of options for that particular factor to explore. This value must be greater than or equal to 1.

integer(kind=int32), intent(out) :: tbl(:,:)

A table where the design will be written. Use get_full_factorial_matrix_size to determine the appropriate table size.

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_INVALID_INPUT_ERROR: Occurs if any items in vars are less than 1. - FS_ARRAY_SIZE_ERROR: Occurs if tbl is not properly sized.

public subroutine get_full_factorial_matrix_size(vars, m, n, err)

Computes the appropriate size for a full-factorial design table.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: vars(:)

An M-element array containing the M factors to study. Each of the M entries to the array is expected to contain the number of options for that particular factor to explore.
This value must be greater than or equal to 1.

integer(kind=int32), intent(out) :: m

The number of rows for the table.

integer(kind=int32), intent(out) :: n

The number of columns for the table.

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_INVALID_INPUT_ERROR: Occurs if any items in vars are less than 1.