### Navigation

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

# scikits.statsmodels.tools.xi

`scikits.statsmodels.tools.``xi`(data, col=None, time=None, drop=False)

  Returns an array changing categorical variables to dummy variables.

  Returns an interaction expansion on the specified variable.

  Take a structured or record array and returns an array with categorical variables.

  Notes

  This returns a dummy variable for EVERY distinct string. If noconsant then this is okay. Otherwise, an “intercept” needs to be designated in regression and this value should be dropped from the array returned by xi.

  Note that STATA returns which variable is omitted when this is called. And it is called at runtime of fit...

  Returns the same array type as it’s given right now (recarray and structured array only).

  The design of xi was pretty ad hoc. Please report any bugs/ additional functionality and note that this function should change heavily in the near future.

### Navigation

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