python 3.x - How to get rid of main effects when coding interaction between categorical variables in patsy? -
i have problem similar :
interaction effects in patsy patsy.dmatrices giving duplicate columns ":" "+" , or "*"
except have other categorical variables besides interaction term. formula :
f = 'vardep ~ c(moisavantdep):c(groupe) + c(joursemdep) + c(moisdep) + jour_nuit'
when run ols regression in statsmodels
formula, main effects variable "groupe", avoid. tried add -1 in formula (as suggested in above mentioned discussion), still main effects.
any suggestion ?
Comments
Post a Comment