Learn R Programming

rcosmo (version 1.1.6)

qstat: q-statistic

Description

This function returns an estimated q-statistic for the specified column intensities in a CMBDataFrame and the list of CMBWindows.

Usage

qstat(cmbdf, listwin, intensities = "I")

Value

Estimated q-statistics for observations in a list of CMBWindows

Arguments

cmbdf

A CMBDataFrame.

listwin

A list of CMBWindows

intensities

A CMBDataFrame column with measured values.

Details

The q-statistics is used to measure spatial stratified heterogeneity and takes values in [0, 1]. It gives the percent of the variance of intensities explained by the stratification. 0 corresponds to no spatial stratified heterogeneity, 1 to perfect spatial stratified heterogeneity.

References

Wang, J.F, Zhang, T.L, Fu, B.J. (2016). A measure of spatial stratified heterogeneity. Ecological Indicators. 67: 250–256.

Examples

Run this code
set.seed(1)
cmbdf <- CMBDataFrame(nside = 8, I = rnorm(12 * 8^2), ordering = "nested")
win1 <- CMBWindow(theta = c(0, pi/2, pi/2), phi = c(0, 0, pi/2))
win2 <- CMBWindow(theta = c(pi/2, pi, pi/2), phi = c(0, 0, pi/2))
qstat(cmbdf, list(win1, win2))

Run the code above in your browser using DataLab