UTEFFTOX: Samples from the posterior of the utility based phase12...

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Takes arguments of data, hypermens and hypervariance vectors and returns a list of posterior samples from the Utility based phase12 model decribed by Chapple and Thall (2019).

Usage

1
UTEFFTOX(YE, YT, Doses, HypermeansEFF, HypermeansTOX, Hypervars, B)

Arguments

YE

Binary indicator vector of efficacy status.

YT

Binary indicator vector of toxicity status.

Doses

Vector of integer Doses given to patients.

HypermeansEFF

Vector of length nDose for dose prior means for efficacy.

HypermeansTOX

Vector of length nDose for dose prior means for toxicity

Hypervars

Length 3 vector of hypervariances.Hypervars(1) contains sigma_0^2, Hypervars(2) contains sigma_mu, Hypervars(3) contains tau - the frailty variance.

B

Number of iterations to run for the MCMC.

Value

A list of posterior samples after burnin in order: Posterior efficacy dose-vector, Posterior toxicity dose-vector, Posterior correlation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
n=100  #Generate Data
YE=rbinom(n,1,.6)
YT=rbinom(n,1,.2)
nDose=5
Doses=sample(1:nDose,n,replace=TRUE)
##Hyperparameters
HypermeansEFF=c(-1,-.5,0,.5,1,2)
HypermeansTOX=HypermeansEFF
Hypervars=c(1,16,1)
B=100
UTEFFTOX(YE, YT,Doses,HypermeansEFF,HypermeansTOX, Hypervars, B)

Phase12Compare documentation built on July 31, 2020, 5:07 p.m.