Re: [R] interaction between categorical variables

2011-06-23 Thread peter dalgaard
On Jun 21, 2011, at 08:39 , taby gathoni wrote: > > Dear R-users, > > I need some assistance. > > I am running some interactive variables for categorical variables. > > I have dgen(2 levels converted to dummy variables) and dtoe(4-levels also > converted to dummy variables). So I have wor

Re: [R] interaction between categorical variables

2011-06-21 Thread Daniel Malter
The reason you get NAs is the rank deficiency. It even says that five coefficients are not defined because of singularities. It is likely the case that certain categories do not exist in the data. Note that in the example below y is ALWAYS zero when x is zero. This makes an interaction inestimable

[R] interaction between categorical variables

2011-06-20 Thread taby gathoni
Dear R-users, I need some  assistance. I am running some interactive variables for categorical variables. I have dgen(2 levels converted to dummy variables)  and dtoe(4-levels also converted to  dummy variables). So I have worked with them in two ways: i created a variable X1 = dgen*dtoeÂ