mixture_scheffe_model
- pyoptex.utils.model.mixture_scheffe_model(mixture_effects, process_effects={}, cross_order=None, mcomp='_mixture_comp_')[source]
Creates a Scheffe model with potential process effects and potential cross-terms between the mixture effects and process effects.
A mixture model with N components is fully defined by N-1 components. Therefore, the mixture_effects parameter should include all but one mixture components as the first element, and the degree as the second element. For example, a mixture with three components is specified by two factors A and B. The degree specifies wether to only include all main effects, or also interactions between the components.
Examples:
mixture = [(‘A’, ‘B’), ‘lin’] will yield (as defined in Scheffé (1958))
\[\sum_{k=1}^3 \beta_k x_k\]mixture = [(‘A’, ‘B’), ‘tfi] will yield (as defined in Scheffé (1958))
\[\sum_{k=1}^3 \beta_k x_k + \sum_{k=1}^2 \sum_{l=k+1}^3 \beta_{k,l} x_k x_l\]process = {‘D’: ‘quad’, ‘E’: ‘quad’} will yield
\[\alpha_0 + \sum_{k=1}^2 \alpha_k z_k + \sum_{k=1}^1 \sum_{l=k+1}^2 \alpha_{k,l} z_k z_l + \sum_{k=1}^2 z_k^2\]mixture = [(‘A’, ‘B’), ‘lin’], process = {‘D’: ‘quad’, ‘E’: ‘quad’} will yield
\[\sum_{k=1}^3 \beta_k x_k + \sum_{k=1}^2 \alpha_k z_k + \sum_{k=1}^1 \sum_{l=k+1}^2 \alpha_{k,l} z_k z_l + \sum_{k=1}^2 z_k^2\]mixture = [(‘A’, ‘B’), ‘tfi’], process = {‘D’: ‘quad’, ‘E’: ‘quad’} will yield
\[\sum_{k=1}^3 \beta_k x_k + \sum_{k=1}^2 \sum_{l=k+1}^3 \beta_{k,l} x_k x_l + \sum_{k=1}^2 \alpha_k z_k + \sum_{k=1}^1 \sum_{l=k+1}^2 \alpha_{k,l} z_k z_l + \sum_{k=1}^2 z_k^2\]mixture = [(‘A’, ‘B’), ‘tfi’], process = {‘D’: ‘quad’, ‘E’: ‘quad’}, cross_order=’lin’ will yield (as defined by Kowalski et al. (2002))
\[\begin{split}&\sum_{k=1}^3 \beta_k x_k + \sum_{k=1}^2 \sum_{l=k+1}^3 \beta_{k,l} x_k x_l + \\ &\sum_{k=1}^2 [ \sum_{i=1}^3 \gamma_{k,i} x_i ] z_k + \sum_{k=1}^1 \sum_{l=k+1}^2 \alpha_{k,l} z_k z_l + \sum_{k=1}^2 z_k^2\end{split}\]mixture = [(‘A’, ‘B’), ‘tfi’], process = {‘D’: ‘quad’, ‘E’: ‘quad’}, cross_order=’tfi’ will yield
\[\begin{split}&\sum_{k=1}^3 \beta_k x_k + \sum_{k=1}^2 \sum_{l=k+1}^3 \beta_{k,l} x_k x_l + \\ &\sum_{k=1}^2 [ \sum_{i=1}^3 \gamma_{k,i} x_i ] z_k + \sum_{k=1}^1 \sum_{l=k+1}^2 [\sum_{i=1}^3 \gamma_{k,l,i} x_i] z_k z_l + \sum_{i=1}^2 [\sum_{k=1}^2 \sum_{l=k+1}^3 \gamma_{k,l,i} x_k x_l] z_i + \sum_{k=1}^2 z_k^2\end{split}\]
Warning
This function is only to see the model used by
mixtureY2X. Do not use this withmodel2Y2X.Parameters
- mixture_effectstuple(list(str), str)
The mixture effects is a tuple with as first element the names of the mixture components, and as second element the model order. All but one mixture component should be specified, e.g., a mixture with three components A, B, and C should only specify A and B in the factors list and as a first element here. The model order is either ‘lin’ or ‘tfi’.
- process_effectsdict(str, str)
Maps the process variable names to their order. The order can be ‘lin’, ‘tfi’, ‘quad.
- cross_orderstr or None
The cross order which is either None, ‘lin’, or ‘tfi’
- mcompstr
The name of the last mixture component.
Returns
- modelpd.DataFrame
A dataframe with the Scheffe model with process variables.