Dear List,
Can anyone send pycno.R to me? It seems like not available now.

Best,

Chen-Liang Wang


>With kind help of Chris Brundson the problem has now been resolved. If
>you face a similar problem download and compile the following script
>before running pycnophylactic interpolation.

>http://dl.dropbox.com/u/30578197/pycno.R

>Juta



On 23/01/2012 14:39, Juta Kawalerowicz wrote:
>/  Dear List,
/>/
/>/  I have been using a Chris Brunsdon's pycno package for a while, but I wondered if anybody has faced problems when trying to interpolate over geographical units where populations distribution is very skewed towards zero (like in ew.wards$elect3). When I run estimations for a more normally distributed variables (such as ew.wards$ppl3), it's working great but I struggle to find a right celldim parameter - it's either too big and gives error or too small and then I run out of memory. I've been experimenting with different parameters for a while now, maybe I am missing something?
/>/
/>/  Anyway here is the code
/>/
/>/  library(pycno)
/>/  load(url("http://dl.dropbox.com/u/30578197/space4.RData"))
/>/  #largish workspace - may take a while to load (bit it does load)
/>/
/>/  ls()		
/>/  #"ew.districts"		shapefile with current districts
/>/  #"ew.wards"     	shapefile with electoral wards from 1973 meregd with electoral results from 1979. I am interested in results in (elect3) showing results of a small far right party.
/>/
/>/  per<-pycno(ew.wards,ew.wards$elect3, 0.1)
/>/  #Maximum Change:          NaN - will stop at      0.00440
/>/  #Error in if (max(abs(old.x - x))<   stopper) break :
/>/  #  missing value where TRUE/FALSE needed
/>/
/>/  #so maybe I should go down with celldim parameter?
/>/
/>/  per<-pycno(ew.wards,ew.wards$elect3, 0.01)
/>/  #Maximum Change:          NaN - will stop at      0.00095
/>/  #Error in if (max(abs(old.x - x))<   stopper) break :
/>/  #  missing value where TRUE/FALSE needed
/>/
/>/  #CAUTION: my laptop with its 4G memory becomes pretty much unresponsive for ~5 min
/>/
/>/  per<-pycno(ew.wards,ew.wards$elect3, 0.001)
/>/  #Error: cannot allocate vector of size 367.9 Mb
/>/  #In addition: Warning messages:
/>/  #1: In validityMethod(object) :
/>/  #  Reached total allocation of 3947Mb: see help(memory.size)
/>/  #2: In validityMethod(object) :
/>/  #  Reached total allocation of 3947Mb: see help(memory.size)
/>/  #3: In validityMethod(object) :
/>/  #  Reached total allocation of 3947Mb: see help(memory.size)
/>/  #4: In validityMethod(object) :
/>/  #  Reached total allocation of 3947Mb: see help(memory.size)
/>/
/>/
/>/  #Compare with how smoothly it works with ew.wards$ppl3
/>/
/>/  ppl<-pycno(ew.wards,ew.wards$ppl3, 0.1)
/>/  image(ppl)
/>/
/>/  Has anybody else encountered/solved this problem before? In the past setting a good celldim parameter has not been that challanging, this is the first time that I am trying to run Tobler's pycnophylactic interpolation on such a skewed data. I've been playing with different values between 0.01 and 0.001 but couldn't find anything which would not give me one of the above errors. I'd be very grateful for any hints.
/>/
/>/  Thanks,
/>/  Juta/

-- 
Doctoral student, Chen-Liang Wang
Research Group of Ecological Modeling and System Simulation
State Key Laboratory of Resources and Environment Information System
Institute of Geographical Sciences and Natural Resources Research
Chinese Academy of Sciences
11A,Datun Road, Anwai, 100101 Beijing, China
Tel: +86 10 64889847
      +86 1500 135 4481


	[[alternative HTML version deleted]]

