mod.commcorrelogram {CommunityCorrelogram}R Documentation

Community Correlogram Model


Function mod.commcorrelogram automatically fits a Gaussian curve to the significance plot of a commcorrelogram object and calculates the correlation range of the data.





A community.correlogram object


An initial guess for the asymptotic maximum significance. Default = 1. The user is advised to consider values for Ch appropriate for their particular dataset and specify values accordingly.


An initial guess for the center of the Gaussian curve. Default = 5. The user is advised to consider values for Cc appropriate for their particular dataset and specify values accordingly.


An initial guess for the Gaussian curve incline. Default = 0.01. The user is advised to consider values for Cw appropriate for their particular dataset and specify values accordingly.


A switch specifying whether to plot results. Default = T.


The level of Type I error to be applied to the analysis. Default = 0.05.


A switch specifying alternative hypothesis for statistical tests to be applied. Options include: 'one.tailed' = statistic <= 0, 'two.tailed' = statistic = 0. Default = 'one.sided'. Note: This selection must match the alternative hypothesis used in the calculation of link{commcorrelogram}.


Weight given to significance points in proximity of alpha. The user is advised to consider values for pw appropriate for their particular dataset and specify values accordingly.


A switch specify position of the legend, and passed to legend. Default = 'topleft'.


Other parameters passed to commcorrelogram


One of the main purposes of constructing a correlogram is to determine the maximum distance at which the samples are statistically similar, or range of correlation. Typically, the range of correlation of a multivariate correlogram is determined by finding on the primary plot the class for which the statistic is no longer significant. However, depending on the lag size and tolerance of the correlogram, this may not be a very precise figure. Depending on the spatial (or temporal) structure reflected in the plot, or the number of pairs in the deciding lag class, the figure may not be very accurate, either.

The approach developed here is to instead plot the significance values of the correlogram in a separate plot and model this plot to determine the point at which the curve is equal to a chosen Type I error rate (alpha, typically 0.05). In univariate geostatistics, the range of correlation is typically found by modeling the semivariogram structure function (Goovaerts, 1997). To model the correlogram significance plot, we developed a Gaussian model similar to that used to model univariate semivariograms:

y^s(h) = C_h(1-e^{C_w(h-C_C)^2})

where C_h is the curve height, C_w the curve width/steepness, C_c the curve center, and h the lag separation.

The mod.commcorrelogram() function automatically fits this Gaussian curve to commcorrelogram objects using the nlminb optimization function and calculates the correlation distance (where the resulting curve equals alpha) using the uniroot function. The function allows the user to provide initial guesses for each parameter and also allows the user to adjust the weight of points that are closest to the alpha level in the optimization routine. This enhances the fit of the curve around the alpha line. In the case where a two-tailed correlogram has been calculated, the ranges at which the modeled curve crosses the alpha/2 line (where samples are no longer statistical similar) and where it crosses the 1-alpha/2 line (where samples become statistically different), called here the "outer range" are reported.


Returns a list of objects of class community.correlogram, each with different lag size used to compute them.


A vector of fitted values for C_h, C_c, and C_w


The original empirical community correlogram used for modeling


A dataframe of predicted values against lag separation distance for use in external plotting or other functions


The correlation range (one.tailed analyses use model = alpha, two.tailed analyses use model=alpha/2)


The outer correlation range for two.tailed analyses (model=1-alpha/2)

Plots of community correlogram metrics, significance values, modeled significance curve and the correlation range are created when plot=TRUE.


J. Malia Andrus, Timothy Kuehlhorn, Luis F. Rodriguez, Angela D. Kent, and Julie L. Zilles

Maintainer: J. Malia Andrus <>


Goovaerts, P. 1997. Geostatistics for natural resources evaluation. Oxford, England: Oxford University Press.

See Also



  ## Not run: 
      mite.commcorr <-commcorrelogram(sampleData=mite,
      mod (mite.commcorr,Ch=1,Cc=2.5,Cw=0.8,pw=3)
## End(Not run)

[Package CommunityCorrelogram version 1.0 Index]