[R-sig-Geo] error in errorsarlm
Danlin Yu
yud at mail.montclair.edu
Fri Jul 16 18:20:33 CEST 2010
Elaine:
Based on the error message (cannot allocate vector of size 121.8 Mb), it
is very possibly you have way too many cases in your data set. A
potential solution would be randomly sample your dataset to get a
representative sample set and run the spatial regression, or you can
always try a computer with more physic memory, or try memory.limit() to
manually allocate more memories. See ?memory.limit for more details.
Hope this helps.
Cheers,
Dr. Danlin Yu
elaine kuo ??:
> Dear List,
>
> I encountered an error message when trying to use Chebyshev as method for
> SAR.
> Please kindly help and thanks.
>
> package spdep was updated on 07162010
> system: windows vista home 32-bit
> R version 2.10.0 (20091026)
>
> Elaine
>
> Code
>
>> library(ncf)
>> library(spdep)
>>
>> # Define coordinates, neighbours, and spatial weights
>> coords<-cbind(datam$lat,datam$lon)
>> coords<-as.matrix(coords)
>>
>> #Define neighbourhood (here distance 1.5)
>> nb10<-dnearneigh(coords,0,9)
>> nb10.w<-nb2listw(nb10, glist=NULL, style="W", zero.policy=FALSE)
>> sem.nb10.w <-
>>
> errorsarlm(datam$WinterM_ratio~datam$topo_mean+datam$coast+datam$prec_max
> +datam$temp_min+datam$evi_min, listw=nb10.w,
> method="Chebyshev",tol.solve=1.0e-17)
> error: cannot allocate vector of size 121.8 Mb
>
>
>> sem.nb10.w <-
>>
> errorsarlm(datam$WinterM_ratio~datam$topo_mean+datam$coast+datam$prec_max
> +datam$temp_min+datam$evi_min, listw=nb10.w,
> method="Chebyshev",zero.policy=TRUE,tol.solve=1.0e-17)
> error in switch(Generic, `+` = , `-` = { :
> Cholmod error 'out of memory' at file:../Core/cholmod_memory.c, line 148
>
> [[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
>
--
___________________________________________
Danlin Yu, Ph.D.
Associate Professor of GIS and Urban Geography
Department of Earth & Environmental Studies
Montclair State University
Montclair, NJ, 07043
Tel: 973-655-4313
Fax: 973-655-4072
email: yud at mail.montclair.edu
webpage: csam.montclair.edu/~yu
More information about the R-sig-Geo
mailing list