Hi I'm working with the function Kest in the package SpatStat (under LINUX with R 2.1.0). In order to evaluate the statistical significance of my point pattern I'm doing 999 Montecarlo replications. The script that use the Kest function runs OK for most of the different point patterns that I have but for a particular point pattern, which have only 17 points, it runs until the 34th iteration and then I receive this message: Error in "[<-"(`*tmp*`, index, value = NULL) : incompatible types (1000) in subassignment type fix Execution halted Do you have any idea about what could be the cause of this ? Thanks in advance D. ----------------------------------------- Stay ahead of the information curve. Receive EDA news and jobs on your desktop daily. Subscribe today to the EDA CafeNews newsletter. [ http://www10.edacafe.com/nl/newsletter_subscribe.php ] It's informative and essential.
(1) Questions about contributed packages (such as spatstat) should in the first instance be directed to the authors/maintainers of the package (in this case Adrian Baddeley and myself) rather than to the list. (2) It's very hard to say what's causing your problem without digging into the specifics. If you could email the problematic data set (it's only 17 points, after all!) to me and/or Adrian, we could probably figure out what's causing the hiccup. (3) It sound's like you are using roll-your-own code to create (effectively) a critical envelope for your estimated K function. Why aren't you using the built-in function envelope()? (4) I believe that 999 replicates is usually overkill for Monte Carlo inference; 99 reps is probably adequate. Other uncertainties that are always present in any real data set dwarf the lack of precision resulting from using ``only'' 99 reps. (Ninety-nine reps is the default in envelope(); but you can set the number of reps to anything you want, including 999 if you insist.) (5) What does ``statistical significance of a point pattern'' mean? cheers, Rolf Turner rolf at math.unb.ca ===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+==Please avoid sending me Word or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html ===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+== On Thu, 1 Sep 2005, DrakeGis wrote:> Hi I'm working with the function Kest in the package SpatStat (under LINUX > with R 2.1.0). In order to evaluate the statistical significance of my > point pattern I'm doing 999 Montecarlo replications. The script that use > the Kest function runs OK for most of the different point patterns that I > have but for a particular point pattern, which have only 17 points, it > runs until the 34th iteration and then I receive this message: > > Error in "[<-"(`*tmp*`, index, value = NULL) : > incompatible types (1000) in subassignment type fix > Execution halted > > Do you have any idea about what could be the cause of this ? Thanks in > advance.
On Thu, 1 Sep 2005, DrakeGis wrote:> Hi I'm working with the function Kest in the package SpatStat (under LINUX > with R 2.1.0). In order to evaluate the statistical significance of my > point pattern I'm doing 999 Montecarlo replications. The script that use > the Kest function runs OK for most of the different point patterns that I > have but for a particular point pattern, which have only 17 points, it > runs until the 34th iteration and then I receive this message: > > Error in "[<-"(`*tmp*`, index, value = NULL) : > incompatible types (1000) in subassignment type fix > Execution halted > > Do you have any idea about what could be the cause of this ? Thanks in > advance.This is not an error message from 'spatstat' itself. The message has been generated by the function "[<-" which is called when you assign values to a subset of a dataset (in a command like x[z] <- v). The message appears to say that the replacement value v is not of the same type as the original vector x. You say that you are running a "script that uses the Kest function". The error is probably inside that script. If you send the script to us we can probably spot the problem for you. As Rolf mentioned in his email, spatstat provides a command "envelope" to compute simulation envelopes. This might be sufficient for your needs. regards Adrian Baddeley