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 5 vector of hypervariances. Hypervars(1) and Hypervars(2) contains the Latent parameter variance for normal probability of efficacy and toxicity. Hypervars(3) and Hypervars(4) contains the hypervariance on dose specific mean efficacy and toxicity parameters and Hypervars(5) contains the frailty variance parameter.

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,1,36,36,1)
B=100
UTEFFTOX(YE, YT,Doses,HypermeansEFF,HypermeansTOX, Hypervars, B)

UtilityFrailtyPH12 documentation built on May 2, 2019, 6:03 a.m.