sen: Sensivity analysis with signed score test

Description Usage Arguments Value Author(s) References Examples

View source: R/core.R

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

1
2
3
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

Author(s)

Paul Rosenbaum, Qingyuan Zhao

References

Examples

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

CrossScreening documentation built on May 2, 2019, 5:15 a.m.