CrossScreening (version 0.1.1)

sen: Sensivity analysis with signed score test

Description

This function implements Rosenbaum's sensitivity analysis for pair-matched observational study with general signed score test. It is faster and more flexible than the psens function in the package rbounds.

Usage

sen(d, mm = NULL, gamma = 1, alternative = c("greater", "less"),
  approx.method = c("normal", "permutation"),
  score.method = c("approximate", "exact"), tau = 0, num.perms = 10000)

Arguments

d
a vector of treatment-minus-control differences
mm
a vector (m, munder, mover) or a matrix, each column a vector (m, munder, mover) that indicates the U-statistic.s NULL means Wilcoxon's signed rank test.
gamma
a vector of sensitivity parameters (must be >= 1).
alternative
report p-value corresponds to the maximum ("upper") or minimum ("lower") bound
approx.method
how to compute the $p$-value upper bound? either "normal" approximation or random "permutations".
score.method
either approximate score or exact score
tau
a scalar, null hypothesis is the additive effect is tau (default 0)
num.perms
number of Monte-Carlo simulations used to compute the sensivitiy value, if approx.method is "permutations".

Value

A list
p.value
p-values corresponding to each entry of gamma
p.value2
two sided p-values
gamma.hat
estimate of design sensitivity
T
test statistic
E
Means of the test statistic under sensivity gamma
V
Variances of the test statistic under sensitivity gamma
eff.size
Effect size of T compared to E and V
E.gamma1
Expectation of T under null at Gamma = 1

References

  • Rosenbaum, Paul R. Observational Studies. Springer New York, 2002.
  • Rosenbaum, P. R. (2011). A New u-Statistic with Superior Design Sensitivity in Matched Observational Studies. Biometrics, 67(3), 1017-1027.

Examples

Run this code

require(CrossScreening)
data(lead)
d.lead <- lead$exposed[-21] - lead$control[-21]
sen(d.lead, gamma = c(1, 2, 3, 4, 5, 6))

Run the code above in your browser using DataLab