test.hetero.test {survcomp} | R Documentation

## Function to test the heterogeneity of set of probabilities

### Description

The function tests whether a set of p-values are heterogeneous.

### Usage

    test.hetero.test(p, weight, na.rm = FALSE)

### Arguments

`p` | vector of p-values
`weight` | vector of weights (e.g. sample size of each study)
`na.rm` | `TRUE` if the missing values should be removed from the data, `FALSE` otherwise

### Details

The p-values should be one-sided and computed from the same null hypothesis.

### Value

`Q` | Q statistic
`p.value` | p-value of the heterogeneity test

### Author(s)

Benjamin Haibe-Kains

### References

Cochrane, W. G. (1954) "The combination of estimates from different experiments", Biometrics, 10, pages 101–129.

Whitlock, M. C. (2005) "Combining probability from independent tests: the weighted Z-method is superior to Fisher's approach", J. Evol. Biol., 18, pages 1368–1373.

### See Also

`combine.test`

### Examples

    p <- c(0.01, 0.13, 0.07, 0.2)
    w <- c(100, 50, 200, 30)

    #with equal weights
    test.hetero.test(p=p)
    #with p-values weighted by the sample size of the studies
    test.hetero.test(p=p, weight=w)

[Package survcomp version 1.40.0 Index]