Skip to content

dummies and multicollinearity in lagsarlm

4 messages · Annachiara Saguatti, Roger Bivand

#
On Thu, 18 Dec 2008, Annachiara Saguatti wrote:

            
This is one of the strengths of the formula abstraction. Dummies are not 
needed, just a factor. The notation would be something like:

formula=y ~ factor / (x1 + x2 + x3 + ...) - 1, data=...

with / using the factor to fit coefficients of the xi for each level of 
factor, and -1 removing a global intercept, so giving an intercept for 
each level of factor. The Chow test is then anova() of the model without 
factor / ... -1 against the model with it.

Hope this helps,

Roger

  
    
#
On Thu, 18 Dec 2008, Annachiara Saguatti wrote:

            
Please read up on factors and formula objects - I suggest Ch 4 of John 
Fox' An R and S-Plus Companion to Applied Regression (Sage, 2002). When 
you have grasped what is going on, try:

D1D2 <- factor(D1+(2*D2))
# maybe with labels= to provide something more informative than just 1 and 2

and

y ~ D1D2 / ...

Hope this helps,

Roger