serialTables: Enumeration of All Possible Four Integral Two-armed...

Description Usage Arguments Details Value Examples

View source: R/manual R codes.r

Description

This Function is to enumerate all possible two-armed Bernoulli-outcomes with the form of 2X2 tables When N patients to be treated.

Usage

1
serialTables(N, X0 = rep(0, 4))

Arguments

N

the number of patients to be treated.

X0

the initial information with setting c(0,0,0,0)

Details

Decision process for the first patient starts with information 0, where no previous patients treated and so only one possible Bernoulli-outcoms with X0=c(0,0,0,0).

xsimple() function used here to enumerate all 2-part composition of N patients to be treated, on a simplex lattice (2,n=N). And this function is required to attach the package "combinat".

ZAS, ZAF,ZBS,and ZBF separately indicate the counts of A&Success,A&Failure,B&Success, B&Failure.

Value

X=Xsm a list of length N+1, each of which is a list of matrices. The values of matrices are 0 throughout.

M the list of the output of 2-part of composition of intergers (n=0, 1,...,N)

Z a list with representing separately counts of A&success, A&failure, B&succsess, and B&failure; and the length of each list equals to the number of all possible combinations of Bernoulli-outcomes when N patients to be treated.

sk to get the same attributes of Xsm.

Examples

1
2
3
4
library(combinat) 
N <- 10
out <- serialTables(N)
attributes(out)

ryamada22/SelfDecABP documentation built on May 28, 2019, 10:44 a.m.