gengaussiandata: Generating function for Gaussian Data.

Description Usage Arguments Value Examples

View source: R/GaussianCode.R

Description

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

Usage

1
gengaussiandata(sample_size, mu1, mean_diff, common_sd)

Arguments

sample_size

Number of subjects per arm.

mu1

mean parameter used in call to rnorm(). Used only in control arm.

mean_diff

Desired Mean Difference between experimental and control groups.

common_sd

sd parameter used in call to rnorm(). Used in both arms.

Value

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

Examples

1
2
samplehistdata <- gengaussiandata(sample_size=60, mu1=25, mean_diff=0, common_sd=3)
samplehistdata

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