permutation: Permutation test

Description Usage Arguments Examples

View source: R/internal-bootstrap.r

Description

Permutation test

Usage

1
permutation(y, d, weights, boot = 100, seed = 120511)

Arguments

y

numeric vector of outcome

d

numeric vector of treatment indicator (contain 1 and 0 only)

weights

numeric vector of weights

boot

how many re-randomization are generated

seed

seed value

Examples

1
2
3
4
5
6
7
8
## Not run: 
y1 <- 2 + rnorm(20, sd = 4)
y0 <- rnorm(20, sd = 4)
d <- sample(c(1, 0), replace = TRUE, size = 40)
y <- ifelse(d == 1, y1, y0)
permutation(y, d, boot = 200)

## End(Not run)

KatoPachi/discreteRD documentation built on Feb. 24, 2022, 12:32 a.m.