Description Usage Arguments Details Value Examples
View source: R/manual R codes.r
This Function is to enumerate all possible two-armed Bernoulli-outcomes with the form of 2X2 tables When N patients to be treated.
1 | serialTables(N, X0 = rep(0, 4))
|
N |
the number of patients to be treated. |
X0 |
the initial information with setting c(0,0,0,0) |
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.
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.
1 2 3 4 | library(combinat)
N <- 10
out <- serialTables(N)
attributes(out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.