Statistics Toolbox    
x2fx

Transform a factor settings matrix to a design matrix.

Syntax

Description

D = x2fx(X) transforms a matrix of system inputs, X, to a design matrix for a linear additive model with a constant term.

D = x2fx(X,'model') allows control of the order of the regression model.'model' can be one of these strings:

Alternatively model can be a matrix of terms. In this case, each row of model represents one term. The value in a column is the exponent to which the same column in X for that term should be raised. This allows for models with polynomial terms of arbitrary order.

x2fx is a utility function for rstool, regstats, and cordexch.

Example

Let x1 be the first column of x and x2 be the second. Then the first column of D is the constant term, the second column is x1, the third column is x2, the fourth column is x1x2, the fifth column is x12, and the last columns is x22.

See Also
rstool, cordexch, rowexch, regstats


 weibstat xbarplot