genlognormaldata {BayesCTDesign}R Documentation

Generating function for Lognormal Data.

Description

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

Usage

genlognormaldata(sample_size, mu1, mean_ratio, common_sd, censor_value)

Arguments

sample_size

Number of subjects per arm.

mu1

meanlog parameter used in call to rlnorm(). Used only in control arm.

mean_ratio

Desired Mean Ratio between experimental and control groups.

common_sd

sdlog parameter used in call to rlnorm(). Used in both arms.

censor_value

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

Value

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

Examples

samplehistdata <- genlognormaldata(sample_size=60, mu1=1.06, mean_ratio=0.6,
                                   common_sd=1.25, censor_value=3)
samplehistdata

[Package BayesCTDesign version 0.6.1 Index]