[R-sig-Geo] impacts in spdep does not work for me when there is	only one predictor
    Eelke Folmer 
    e.o.folmer at gmail.com
       
    Tue Sep 28 12:47:41 CEST 2010
    
    
  
Dear Roger and others,
Using the impacts function in spdep to calculate distributions (on the 
regression parameters from the spatial lag model) I encountered the 
following problem: when there is only one exogenous predictor in the 
model the impacts function won't give the output summary of the mcmc 
simulations. Given the time the function takes to produce the error I 
think that the simulations do run.
I tried the same on the columbus data where it also happens
example(columbus)
listw <- nb2listw(col.gal.nb)
lobj  <- lagsarlm(CRIME ~ INC, columbus, listw)
summary(lobj)
imp   <- impacts(lobj, listw=birds.wlist, R=100)
summary(imp,  zstats=TRUE)
Error in dimnames(x) <- dn :
   length of 'dimnames' [2] not equal to array extent
lobj  <- lagsarlm(CRIME ~ INC + HOVAL, columbus, listw)
summary(lobj)
imp   <- impacts(lobj, listw=birds.wlist, R=100)
summary(imp,  zstats=TRUE)
works fine.
I hope I didn't miss anything obvious.
Thanks in advance,
Eelke
    
    
More information about the R-sig-Geo
mailing list