An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20080114/1f5809aa/attachment.pl>
CHOLMOD and GetClass error when running errorsarlmfrom spdep package with method = Matrix or SparseM
3 messages · Debarchana Ghosh, Roger Bivand, Andrew Niccolai
On Mon, 14 Jan 2008, Debarchana Ghosh wrote:
Hi, I'm working on Windows with 2GB RAM. I'm trying to run the errorsarlm with 28 predictor variables and 16,854 records. The listw object is created by the dnearneigh function with upper limit of distance as 2500m. Following are the sequence of codes.
Quote: CHOLMOD error: out of memory seems quite clear. How dense is your weights matrix - just say: print(wts2500) If it is such that some observations have many neighbours, the matrix will still be large. Users have run with n > 30,000, so 16,000 is feasible, but your case may be special - distance is not an ideal criterion. Roger
## Read polygon shape file
adrbaseshp<-readShapePoly("tricounty_2005_12JAN_WORKING.shp", IDvar="ID",
verbose=TRUE)
### creating neighbor list
coords<-coordinates(adrbaseshp)
rn<-sapply(slot(adrbaseshp, "polygons"), function(x) slot(x, "ID"))
nb2500<-dnearneigh(coords, 0, 2500, row.names=rn)
## neighbor to weigth matrix
wts2500<-nb2listw(nb2500, zero.policy=TRUE)
## lagrange diagnostics
adr_rd_ols.lagrange<-lm.LMtests(adr_rd_ols.lm, wts2500, test="all",
zero.policy=TRUE)
# Spatial error model package spdep
## To work around the memory problem I used method="Matrix" (suggested by
Roger Bivand)
adr_rd.saerror<-errorsarlm(LN_PRICE~., data=adr_rd_ols, wts2500,
zero.policy=TRUE, method="Matrix")
## It gave me the following error which I can't understand
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CHOLMOD error: out of memory
Error in asMethod(object) : no function to return from, jumping to top level
In addition: Warning messages:
1: NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
2: NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
3: NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
CHOLMOD error: out of memory
Error in switch(.Generic, "+" = , "-" = .Call(Tsparse_to_Csparse,
new("dgTMatrix", :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in initialize(value, ...) : no function to return from, jumping to top
level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in `slot<-`(.Object, slotName, check = FALSE, slotVal) :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in `slot<-`(.Object, slotName, check = FALSE, slotVal) :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in `slot<-`(.Object, slotName, check = FALSE, slotVal) :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
Error in `slot<-`(.Object, slotName, check = FALSE, slotVal) :
no function to return from, jumping to top level
In addition: Warning message:
NA/Inf replaced by maximum positive value in: optimize(sar.error.f.M,
interval = interval, maximum = TRUE,
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I also tried the following
adr_rd.saerror<-errorsarlm(LN_PRICE~., data=adr_rd_ols, wts2500,
zero.policy=TRUE, method="SparseM")
I got the following
Error in getClass(Class, where = topenv(parent.frame())) :
"matrix.csr" is not a defined class
In addition: Warning message:
'asMatrixCsrListw' is deprecated.
Use 'as_dgRMatrix_listw' instead.
See help("Deprecated") and help("spdep-deprecated").
Again, I don't understand the error. How should I run the errorsarlm
function?
Thanks in advance.
Debs.
--
Debarchana Ghosh
PHD Candidate | Research Assistant
Department of Geography
University of Minnesota.
PH: 8143607580
www.tc.umn.edu/~ghos0033/ <http://www.tc.umn.edu/%7Eghos0033/>
[[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
Dear Spatial R group, I disclose that I have been more active in image segmentation than spatial statistics of late so please bear with me if this question is too pedantic. I have a field collected marked point pattern of tree crown size classes. The point data consists of the X,Y coordinates of the center of the tree crown projected onto CT State Plane Datum and the estimated crown size class (described as a radius measured in feet). There are 8 possible size classes: 4, 6, 8, 10, 12, 14, 16 and 20 feet. I have produced a marked point pattern data set with the same crown size class attribute from an automatic crown detection algorithm using remotely sensed data. I would like to test how similar (or different if that turns out to be the case) the two marked point patterns are to each other, ie, how well the size class spatial location and distributions match. I know this is not a perfect match as there are 516 field measured points and 568 remotely sensed points. However, I am looking for a metric to assess how closely the simulated size class distribution patterns emulate the field measured patterns. Any suggestions are truly appreciated. Thanks, Andrew Niccolai Doctoral Candidate Yale University office (203) 432-5144 cell (860) 402-6079