sen.value: Compute sensitivity value

Description Usage Arguments Details Value Author(s) References Examples

Description

Compute sensitivity value

Usage

1
2
sen.value(d, alpha = 0.05, mm = c(2, 2, 2), alternative = c("greater",
  "less", "two.sided"), score.method = c("approximate", "exact"))

Arguments

d

a vector or matrix of treatment-minus-control differences (each column correponds to a hypothesis)

alpha

significance level

mm

test statistic, either a vector of length 3 or a matrix of three rows where each column corresponds to a U-statistic. Default is the (approximate) Wilcoxon's signed rank test.

alternative

report p-value corresponds to the maximum ("upper") or minimum ("lower") bound

score.method

either approximate score or exact score

Details

The alternative direction is the the center of d is greater than 0.

Value

sensitivity value, i.e. the kappa value such that the p-value becomes just insignificant. If mm is a matrix, then return a vector of sensitivity values corresponding to each column of mm.

Author(s)

Qingyuan Zhao

References

Qingyuan Zhao. On sensitivity value of pair-matched observational studies. arXiv 1702.03442, https://arxiv.org/abs/1702.03442.

Examples

1
2
3
4
d <- rnorm(100) + 1
gamma.star <- kappa2gamma(sen.value(d, alpha = 0.05, mm = matrix(c(2, 2, 2, 8, 5, 8), ncol = 2)))
gamma.star
sen(d, mm = c(2, 2, 2), gamma = gamma.star[1])$p.value # should equal the significance level 0.05

qingyuanzhao/CrossScreening documentation built on May 26, 2019, 11:35 a.m.