x2fx

pyoptex.utils.design.x2fx(Yenc, modelenc)[source]

Create the model matrix from the design matrix and model specification. This specification is the same as MATLAB’s. A model is specified as a matrix with each term being a row. The elements in each row specify the power of the factor. E.g.

  • The intercept is [0, 0, …, 0]

  • A main factor is [1, 0, …, 0]

  • A two-factor interaction is [1, 1, 0, …, 0]

  • A quadratic term is [2, 0, …, 0]

Parameters

Yencnp.array(2d)

The encoded design matrix.

modelencnp.array(2d)

The encoded model, specified as in MATLAB.

Returns

Xnp.array(2d)

The model matrix