hist_start: Initializes a design based on historical controls before the...

Description Usage Arguments Value Examples

Description

Initializes a design based on historical controls before the start of the study.

Usage

1
2
hist_start(hist_data, formula, phi = "odds_ratio", c1, modelfit = NULL,
  mean0 = NULL, mean1 = NULL, alpha = 0.05, beta = 0.2)

Arguments

hist_data

A data frame containing covariates and binary responses for historical controls.

formula

A formula which is used for fitting a logistic regression model on the historical data.

phi

The relation between the response rate under the null and the response rate under the interesting alternative. "odds_ratio" assumes that the odds ratio (OR) between these response rates is constant with OR = c1+1. "difference" assumes that the response rate under the alternative is c1 higher than under the null. Can also be specified by the user by providing a function with arguments c and x.

c1

parameter for obtaining the response rate under the alternative, see description of phi.

modelfit

Can be used instead of formula and hist_data to provide an arbitrary fitted model that is compatible with predict(modelfit, type="response"). formula and hist_data are ignored if modelfit is specified.

mean0

Optional: Can be used to overwrite the estimated average response rate under the null of the fitted model.

mean1

Optional: Can be used to overwrite the estimated average response rate under the alternative of the fitted model.

alpha

Specified type I error of the trial.

beta

Specified type II error of the trial.

Value

A list returning the arguments of the function and the preliminary design for starting the stratified trial.

Examples

1
2
3
4
X <- abs(rnorm(1000, 0, 1))
Y <- rbinom(1000, 1, 1-exp(-X))
mydata <- data.frame("X" = X, "Y" = Y)
hist_start(mydata, Y~X, c1 = 2)

hctrial documentation built on May 1, 2019, 10:53 p.m.