build_augbin_data: Build a dataset of class '"augbin_data"'

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/build_augbin_data.R

Description

Builds a dataset of class "augbin_data", principally for use with augbin.

Usage

1
2
3
build_augbin_data(continuous = stats::rnorm(100),
  binary = stats::rbinom(100, 1, 0.4), treatment = stats::rbinom(100,
  1, 0.5), dichotomisation = 0, summary = FALSE)

Arguments

continuous

A numeric vector containing the observations of a continuous component of a responder outcome. Each element should correspond to the observation for a different patient.

binary

A numeric vector containing the observations of a binary failure component of a responder outcome. Each element of binary must be either 0 or 1 and its length should be equal to that of continuous. In addition, its elements should be ordered such that the observation for a particular patient is in the same position as it is in continuous.

treatment

A numeric vector containing the treatment assignments. Each element of treatment must be either 0 (corresponding to the 'control' arm) or 1 (corresponding to the 'experimental' arm). In addition, its elements should be ordered such that the treatment assignment for a particular patient is in the same position as it is in continuous.

dichotomisation

A numeric giving the dichotomisation hreshold for the continuous component (see continuous). A patient is a responder if their binary component (see binary) is 0 and their continuous component is below dichotomisation.

Details

The responder outcome is assumed to define a responder when a continuous component (see continuous) is below a particular dichotomisation threshold (see dichotomisation) and a binary component (see binary) is 0.

Value

A tibble, with additional class "augbin_data".

Author(s)

Michael J Grayling.

See Also

augbin, print.augbin, summary.augbin, plot.augbin.

Examples

1
2
# Create a randomly generated dataset from 100 patients
data <- build_augbin_data()

mjg211/augbin documentation built on Dec. 7, 2019, 12:28 a.m.