UTEFFTOX {Phase12Compare} | R Documentation |
Samples from the posterior of the utility based phase12 model.
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
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
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)
[Package Phase12Compare version 1.5 Index]