[R-sig-DCM] Inclusion of interaction without its main effect

Marcel Gerds marcel.gerds at berkeley.edu
Wed Feb 2 22:17:31 CET 2011


I withdraw the question. I have just figured it out myself.
One has only to create a variable which includes the interaction:

interact <- cost_a / income

This new variable can then be included in the model without having the 
respective main effect in the model.

mlogit.model <- mlogit ( choice ~ interact + cost_b , data = data _ ml )

Best regards,
Marcel

> Dear fellow DC modellers,
>
> I want to include an interaction term as an explanatory variable 
> without having its main effect in the model. For example, I run
>
> mlogit.model <- mlogit ( choice ~ cost_a / income + cost_b , data = 
> data _ ml )
>
> where two kind of cost are used as explanatory variables for choosing 
> an alternative. Income is a subject-specific variable. However, if I 
> run this, R not only includes cost_b and cost_a:income in the model, 
> but also cost_a.
> Is there a way to suppress the inclusion of a main effect when one 
> wants to add only its interaction?
> Thanks for any help.
>
> Best regards,
> Marcel 

-- 
Marcel Gerds, M.Sc.
University of California
Department of Agricultural and Resource Economics
233 Giannini Hall
Berkeley, CA 94720

Tel.:  +1 510-643-2202
Mobil: +49 176 21302825

E-Mail: marcel.gerds at berkeley.edu
web:    www.marcel-gerds.de



More information about the R-SIG-DCM mailing list