I would like some clarification regarding a regression specified using Wilkinson-Rogers notation to produce coefficients for all levels in a categorical variable.
Consider the regression specifed by Income ~ Sex, where Sex is a categorical variable with two levels, Male and Female. This regression will produce two coefficients, one for the intercept, and one for either the level Male or Female, as the effect of one level of Sex is automatically incorporated into the intercept.
My question is what coefficients should the notation Income ~ Sex - 1 produce? This is used to exclude the intercept term. In R, which uses a 'modified form' of Wilkinson-Rogers this fits coefficients to both levels of Sex. However, in Matlab, one level is still dropped, thus only one coefficient is produced.
mixed-modelbecause I think this relates very often with mixed models too. I think it will get your answer better visibility in the future. – usεr11852 Jul 26 '16 at 00:50