[R-sig-Geo] dummies and multicollinearity in lagsarlm

Roger Bivand Roger.Bivand at nhh.no
Thu Dec 18 13:59:31 CET 2008


On Thu, 18 Dec 2008, Annachiara Saguatti wrote:

> Hello,
>
> is there a way to estimate a sar model (> lagsarlm) with a dummy variable in
> order to discriminate into two spatial regimes and obtain two different
> coefficients' estimations for each variable? So far I've been constructing
> two new variables from each original one by multiplicating it by each dummy,
> that is: GPC*D1 and GDP*D2. After that I've been running a regression by
> using the two new variables as explanatory v.
> Since the two dummies are perfecly complementary, I guess there might be a
> problem of multicollinearity in this way of estimating the model. Is there
> an option like the "subset" one in the "lm" function which I can use in a
> SAR model? Or otherwise, how would you estimate a SAR model with two spatial
> regimes in R?

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


>
> Thank you
> Annachiara Saguatti
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list