genlognormaldata: Generating function for Lognormal Data.

Description Usage Arguments Value Examples

View source: R/LogNormalCode.R

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

1
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

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

begglest/BayesCTDesign documentation built on Nov. 29, 2021, 10:34 p.m.