Learn R Programming

confidenceSim (version 0.1.0)

getDataCont: Get Continuous Data

Description

Given an arm allocation and response rates, this function generates response from a given distribution.

Usage

getDataCont(arm, resprate, dist = "norm")

Value

Returns a continuous value corresponding to patient response.

Arguments

arm

Arm allocation for a single patient. Expects number in 1,2,...,n where n is the number of treatment arms including control.

resprate

Response rates for each arm. Expects a list of n lists with the first list containing median and standard deviation paramaterizing control response. Expects c(mean, sd) for each arm.

dist

Type of distribution. Default is normal (norm).

Examples

Run this code
response <- getDataCont(1, list(control = c(0,1), treatment = c(0.5,1)), dist='norm')

Run the code above in your browser using DataLab