[R-sig-Geo] error message when running errorsarlm
evans324 at umn.edu
evans324 at umn.edu
Tue May 20 21:29:50 CEST 2008
Thanks for your response. Here's what I have now.
On May 20 2008, Roger Bivand wrote:
>A bit more context would help. The output of sessionInfo() at least (R and
>package versions may matter), plus the preceding code, including the
>definition of rams_dak.dnear3k.listw - is it row-standardised?
Output of sessionInfo():
R version 2.6.1 (2007-11-26)
locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
attached base packages:
 stats graphics grDevices utils datasets methods base
other attached packages:
 spdep_0.4-17 Matrix_0.999375-5 lattice_0.17-2 spam_0.13-2 boot_1.2-30
 foreign_0.8-23 sp_0.9-23 tripack_1.2-11 car_1.2-7
loaded via a namespace (and not attached):
 grid_2.6.1 tools_2.6.1
rams_dak <-readShapePoly("rams_dak_6May.shp", IDvar="ID", verbose=TRUE)
rn<-sapply(slot(rams_dak, "polygons"), function(x) slot(x, "ID"))
rams_dak.dnear.nb <- dnearneigh(coords, 0, 2500, row.names=rn)
rams_dak.dnaer.listw <- nb2listw(rams_dak.dnear.nb, zero.policy=TRUE)
> Running traceback() immediately after the error would also be helpful to
> see where in functions called by sar.error.f.M() the problem is
2: stop(gettextf("no method or default for coercing \"%s\" to \"%s\"",
thisClass, Class), domain = NA)
1: as((I - lambda * csrw), "dsCMatrix")
> If I understand correctly, the error messages cycle, but the
> rams_dak3k.err >object is created?
>Could you run it with quiet=FALSE, so see the function values as they are
>generated in optimize()? The NAs usually come from the
>interval= being too broad wrt. your weights style.
I did this and found that lambda ranged from -.2364499 to .999 with SSEs
starting at 292.339 and going to 267.4409. I a bit unsure of how to select
and interval. Can you offer some advice on this?
Thanks for your help.
Ph.D. Candidate: Conservation Biology
Office: 305 Ecology & 420 Blegen
University of Minnesota
Dept. of Geography
414 Social Science Bldg.
267 19th Ave. S.
Minneapolis, MN 55455
More information about the R-sig-Geo