SurrogateCohortSample: SurrogateCohortSample

Description Usage Arguments Value

View source: R/SurrogateCohortSample.R

Description

Creates a stratified sample based on values of stratify_var Where each partition/stratification has size denoted by n.strata

Usage

1
2
SurrogateCohortSample(df, stratify.var = c(quo(Z1), quo(Z2)),
  n.strata = c(400, 400, 0), REPLACE = FALSE)

Arguments

df

Input data frame

stratify.var

Vector of stratification variables in quo()

n.strata

Vector of sample sizes for each stratify.var element; last element is sample size for simple random sample

REPLACE

whether to sample with replacement

Value

sampled.df: A stratified sample with sum(n.strata) rows according to specified sampling scheme


wlktan/surrogateSampling documentation built on May 23, 2019, 3:07 p.m.