genbernoullidata: Generating function for Bernoulli Data.

Description Usage Arguments Value Examples

View source: R/BernoulliCode.R

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

1
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

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

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