genbernoullidata {BayesCTDesign}R Documentation

Generating function for Bernoulli Data.

Description

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

Usage

genbernoullidata(sample_size, prob1, odds_ratio)

Arguments

sample_size

Number of subjects per arm.

prob1

prob parameter used in call to rbinom(). Used only in control arm.

odds_ratio

Desired Odds Ratio between experimental and control groups.

Value

genlogisticdata() returns a data frame with columns: 'id', 'treatment', and 'y'.

Examples

samplehistdata <- genbernoullidata(sample_size=60, prob1=0.6, odds_ratio=0.6)
samplehistdata

[Package BayesCTDesign version 0.6.0 Index]