Displaying 1 result from an estimated 1 matches for "gesellschaftspolitik".
2006 Nov 29
2
Dummies multiplied with other variable
Hi,
I would like to estimate something like y = a + b*d2*y + c*d3*y where
the dummies are created from some vector d with three (actually many
more) levels using factor(). But either there is included the variable
y or d1*y. How could I get rid of these?
Example:
x = c(1,2,3,4,5,6,7,8)
y = c(3,6,2,8,7,6,2,4)
d = c(1,1,1,2,3,2,3,3)
fd = factor(d)
lm(x ~ fd*y)
gives:
Coefficients:
(Intercept)