CrossScreening (version 0.1.1)

sen.value: Compute sensitivity value

Description

Compute sensitivity value

Usage

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

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.

Details

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

References

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

Examples

Run this code
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

Run the code above in your browser using DataCamp Workspace