RandEmax {clinDR} R Documentation

## Random data constructor function for emaxsim creating random parameters for an Emax model for continuous or binary data.

### Description

Creates a list object that contains inputs and a function to create simulated data sets for emaxsim. Data sets are created by generating random parameters from beta or log-normal distributions for a 3/4 parameter Emax model. For binary data, the Emax model is on the logit scale and then back-transformed.

### Usage

RandEmax(n, doselev,
parmEmax,
parmE0,
p50,
parmED50=c(3,0.79,0.6),
parmLambda=c(3.03,18.15,0,6),
resSD,
dfSD=Inf,
binary=FALSE)


### Arguments

 n Sample size for each dose group. doselev Dose levels (including 0 for placebo) included in the study corresponding to n. Must be in increasing order. parmEmax Vector with mean and standard deviation for a random normal Emax parmE0 Vector with mean and standard deviation for a random normal intercept. p50 The predicted ED50 parmED50 The log(ED50) is generated from a t-distribution with df=parmED50[1], mean=log(p50)+parmED50[2], and scale=parmED50[3]. The default values are taken from the reference below. parmLambda For a beta distributed sigmoid lambda, a vector with (df1,df2,lower bound, upper bound). For a hyperbolic model, lambda=1. resSD Standard deviation for residuals within each dose (normal data only) dfSD If a finite value is specified, the within-dose group SD is randomly generated from resSD times sqrt(dfSD/chisquare(dfSD))), which is the form of a posterior distribution for a SD based on a existing sample. binary When TRUE, 0/1 data are generated from the Emax model, which is computed on the logit scale and then backtransformed to yield proportions.

### Details

All parameters are independent. Normal data are generated from the dose response curves with homogeneous-variance normal residuals. Binary data are 0/1 generated from Bernoulli distributions with proportions computed by transforming the Emax model output from the logit to proportion scale. Default values are based on recommendations in

Thomas, N., Sweeney, K., and Somayaji, V. (2014). Meta-analysis of clinical dose response in a large drug development portfolio. <doi:10.1080/19466315.2014.924876>

### Value

A list of length 2. The first element is itself a list named genP that contains named elments n, resSD, dfSD, doselev, dose, binary and the elements parmE0, p50, parmED50, parmEmax, and parmLambda. which are specific to RandEmax. The second element is a function named genFun that takes genP as input and returns a list with named elements meanlev, parm, resSD, y.

### Author(s)

Neal Thomas

emaxsim, FixedMean
simParm<-RandEmax(n=c(99,95,98,94,98,98),doselev=c(0,5,10,25,50,150),