polyasUrnFuncAdv: Polya's Urn Advanced Function

Description Usage Arguments Value Author(s) See Also Examples

Description

function that represents the advanced polya's urn simulation setup and creates a 3D matrix (treatment x patients x simulations) to be used for the plotRatio Besides the same input as in polyasUrnFuncSimple additionally you have the ability to change the treatment success rate for treatment 1 and 2, the number of starting balls (for treatment 1 and 2), the number of return balls (for treatment 1 and 2) and the relapse rate of treatment 1 and 2.

Usage

1
2
3
polyasUrnFuncAdv(pat, sim, trt = 2, trtRat1 = 100, trtRat2 = 100,
  nbrBalls1 = 1, nbrBalls2 = 1, nbrRetur1 = 1, nbrRetur2 = 1,
  nbrRelap1 = 0, nbrRelap2 = 0)

Arguments

pat

Number of patients

sim

Number of simulations

trt

Number of treatments (default = 2)

trtRat1

Success rate of 1. treatment

trtRat2

Success rate of 2. treatment

nbrBalls1

Beginn rate of balls for 1. treatment

nbrBalls2

Beginn rate of balls for 2. treatment

nbrRetur1

Return rate of balls for 1. treatment

nbrRetur2

Return rate of balls for 2. treatment

nbrRelap1

Relapse rate of balls for 1. treatment

nbrRelap2

Relapse rate of balls for 2. treatment

Value

3D matrix (treatment x patients x simulations) with the ratio of each treatment compared to all treatments for each patient and each simulation

Author(s)

mitja seibold mitja.seibold@student.uva.nl

See Also

polyasUrnFuncSimple

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
p <- 100
s <- 2
t <- 3
plotRatio(polyasUrnFuncAvanced(p,s,t))

p <- 100
s <- 2
t <- 3
tRat1 <- 50, tRat2 <- 75
nBalls1 <- 2, nBalls2 <- 3
nRet1 <- 4, nRet2 <- 2
nRel1 <- 3
nRel2 <- 2 
plotRatio(polyasUrnFuncAdvanced(p,s,t,tRat1,tRat2,nBall1,nBalls2,nRet1,nRet2,nRel1,nRel2))

81N55E/PNS_Polya documentation built on May 24, 2019, 8:48 p.m.