statsmodels.sandbox.regression.try_ols_anova.form2design(ss, data) [source]
convert string formula to data dictionary
ss : string data : dict or structured array | Returns: |
|
|---|
>>> xx, n = form2design('I a F:b P:c*d G:c*f', testdata)
>>> xx.keys()
['a', 'b', 'const', 'cf', 'cd']
>>> n
['const', 'a', 'b', 'cd', 'cf']
with sorted dict, separate name list wouldn’t be necessary
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.sandbox.regression.try_ols_anova.form2design.html