EFFTOX {Phase123}R Documentation

Obtains estimated posterior probabilities of the four outcomes of (YE,YT) for each dose.

Description

This function is used in Reoptimize, SimPhase123 and SimPhase3, here we estimate the mixture probabilities over the four outcomes for efficacy and toxicity.

Usage

EFFTOX(YE, YT, Doses, Dose, Hypermeans, Hypervars, B)

Arguments

YE

Vector containing observed efficacy indicators.

YT

Vector containing observed toxicity indicators.

Doses

Vector containing Standardized doses of patients in trial.

Dose

Vector containing the standardized doses considered.

Hypermeans

Vector containing prior hypermeans of length 6 for Eff-Tox parameters.

Hypervars

Vector containing prior hypervariances of length 6 for Eff-Tox parameters.

B

Number of iterations to perform in the MCMC.

Value

The posterior probability matrix for the events (YE,YT) in each row corresponding to a dose level.

Examples

##Doses, YE,YT
Doses= c(1,1,1,2,2,2,1,1,1,3,3,3,1,1,1,2,2,2)
YE = c(0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0)
YT=c(0,0,0,1,1,0,1,0,0,1,1,1,0,0,0,1,0,0)
##Vector of Numerical Doses
Dose = c(1,2,3,3.5,5)
Dose=(Dose-mean(Dose))/sd(Dose)
Doses=Dose[Doses]
##Hypermeans
Hypermeans = c(.022,3.45,0,-4.23,3.1,0)
Hypervars = c(2.6761, 2.6852, .2, 3.1304, 3.1165, 1)
Hypervars=Hypervars^2
##Number of iterations
B=2000
EFFTOX(YE,YT, Doses, Dose, Hypermeans,  Hypervars, B )

[Package Phase123 version 2.1 Index]