genweibulldata: Generating function for Weibull Data.

Description Usage Arguments Value Examples

View source: R/WeibullCode.R

Description

genweibulldata() function used mainly internally by weibulltrialsimulator() and weibulltrialsimulatornohist() functions to generate data for a two-arm clinical trial, experimental and control groups. Can be used to generate random trial data.

Usage

1
2
genweibulldata(sample_size, scale1, hazard_ratio, common_shape,
  censor_value)

Arguments

sample_size

Number of subjects per arm.

scale1

Scale parameter used in call to rweibull(). Used only in control arm.

hazard_ratio

Desired Hazard Ratio between experimental and control groups.

common_shape

Shape parameter used in call to rweibull(). Used in both arms.

censor_value

Value at which time-to-event data are right censored.

Value

genweibulldata() returns a data frame with columns: 'id', 'treatment', 'event_time', and 'status'.

Examples

1
2
3
4
SampleHistData <- genweibulldata(sample_size=60, scale1=2.82487,
                                 hazard_ratio=0.6, common_shape=3,
                                 censor_value=3)
SampleHistData

begglest/BayesCTDesign documentation built on Aug. 14, 2018, 4:31 a.m.