This appends a column of ones to an array if prepend==False.
For ndarrays it checks to make sure a constant is not already included. If there is at least one column of ones then the original array is returned. Does not check for a constant if a structured or recarray is given.
Parameters : | data : array-like
prepend : bool
|
---|---|
Returns : | data : array
|
Notes
Warning
The default of prepend will be changed to True in the next release of statsmodels. We recommend to use an explicit prepend in any permanent code.