hMeanChiSqMu: Computes the p-value from the harmonic mean chi-squared test

Description Usage Arguments Value Author(s) References Examples

View source: R/hMeanChiSqMu.R

Description

The p-value from the harmonic mean chi-squared test is computed based on study-specific estimates and standard errors.

Usage

1
2
hMeanChiSqMu(thetahat, se, w=rep(1, length(thetahat)), mu=0, 
             alternative="greater", bound=TRUE)

Arguments

thetahat

A vector of parameter estimates.

se

A vector of standard errors.

w

A vector of weights.

mu

The null hypothesis value. Defaults to 0.

alternative

Either "greater", "less", "two.sided" or "none". Defaults to "greater". Specifies the alternative to be considered in the computation of the p-value. If alternative is two-sided, then a one-sided p-value for intrinsic credibility is computed.

bound

Determines whether p-values that cannot be computed are reported as "> bound" ("bound=TRUE") or as NA ("bound=FALSE")

Value

The p-value from the harmonic mean chi-squared test

Author(s)

Leonhard Held

References

Held, L. (2020). The harmonic mean chi-squared test to substantiate scientific findings. Journal of the Royal Statistical Society: Series C (Applied Statistics), 69, 697-708. https://doi.org/10.1111/rssc.12410

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    
## Example from Fisher (1999) as discussed in Held (2020)
## but now based HR estimates
    
lower <- c(0.04, 0.21, 0.12, 0.07, 0.41)
upper <- c(1.14, 1.54, 0.60, 3.75, 1.27)
se <- ci2se(lower, upper, ratio=TRUE)
estimate <- ci2estimate(lower, upper, ratio=TRUE)

hMeanChiSqMu(thetahat=estimate, se=se, alternative="two.sided")
hMeanChiSqMu(thetahat=estimate, se=se, w=1/se^2, alternative="two.sided")
hMeanChiSqMu(thetahat=estimate, se=se, alternative="two.sided", mu=-0.1)

ReplicationSuccess documentation built on Dec. 2, 2020, 3 p.m.