opgam.iscluster.default: Local Clustering Test Function

View source: R/opgam.R

isclusterR Documentation

Local Clustering Test Function


This function is passed to function gam as argument iscluster to decide whether the current circle must be marked as a cluster or not.

opgam.iscluster.default is the function used by default, based on quantiles of the Poisson distribution.

opgam.iscluster.negbin is similar to the previous one but based on the Negative Binomial distribution. Local significance is estimated using bootstrap since it involves the sum of Negative Binomial variables.


opgam.iscluster.default(data, idx, idxorder, alpha,  ...)
opgam.iscluster.negbin(data, idx, idxorder, alpha, mle, R=999, ...)



A dataframe with the data, as explained in DCluster manual page.


A boolean vector to know the areas in the current circle.


A permutation of the rows of data to order the regions according to their distance to the current center.


Test signifiance.


Estimators of some parameters needed by the Negative Binomial distribution. See negbin.sim manual page for details.


Number of simulations made used to estimate local pvalues.


Any other arguments required.


These functions take a number of arguments to be able to assess whether the current ball is a cluster or not. We have follow this approarch to create a common framework for all scan methods.

The vector returned by this functions can be of size higher than four, but the first four elements must be those stated in this manual page (and in the same order).

More example can be found in the implementations of other scan methods, such as Besag and Newell's, and Kulldorff and Nagarwalla's.


A vector with four values:


Value of the statistic computed.


A boolean value, which is TRUE for clusters.


The pvalue obtained for the test performed.


Size of the cluster in inumber of regions from the centre.

See Also

opgam, besagnewell, bn.iscluster, kullnagar, kn.iscluster, turnbull, tb.iscluster

DCluster documentation built on Sept. 3, 2023, 5:07 p.m.