genweibulldata {BayesCTDesign}R Documentation

Generating function for Weibull Data.

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

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

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

[Package BayesCTDesign version 0.6.0 Index]