6.8.2.1.8. statsmodels.sandbox.stats.contrast_tools.dummy_nested¶
-
statsmodels.sandbox.stats.contrast_tools.
dummy_nested
(d1, d2, method='full')[source]¶ unfinished and incomplete mainly copy past dummy_product dummy variable from product of two dummy variables
Parameters: d1, d2 : ndarray
two dummy variables, d2 is assumed to be nested in d1 Assumes full set for methods ‘drop-last’ and ‘drop-first’.
method : {‘full’, ‘drop-last’, ‘drop-first’}
‘full’ returns the full product, which in this case is d2. The drop methods provide an effects encoding: (constant, main effects, subgroup effects). The first or last columns of the dummy variable (i.e. levels) are dropped to get full rank encoding.
Returns: dummy : ndarray
dummy variable for product, see method