### Navigation

- index
- modules |
- next |
- previous |
- statsmodels v0.1.0 documentation »
- Tools »

# scikits.statsmodels.tools.add_constant

`scikits.statsmodels.tools.``add_constant`(data)

  This appends a constant to the design matrix.

  It checks to make sure a constant is not already included. If there is at least one column of ones then an array of the original design is returned.

  Parameters: | data : array-like data is the column-ordered design matrix
  Returns: | data : array The original design matrix with a constant (column of ones) as the last column.

### Navigation

- index
- modules |
- next |
- previous |
- statsmodels v0.1.0 documentation »
- Tools »