jointprobs {CorrBin}  R Documentation 
An exchangeable multinomial distribution with K+1
categories O_1,\ldots,O_{K+1}
, can be
parameterized by the joint probabilities of events
\tau_{r_1,\ldots,r_{K}n} = P\big[X_1=\cdots=X_{r_1}=O_1,\ldots, X_{\sum_{i=1}^{K1}r_i+1} =\cdots=X_{\sum_{i=1}^{K}r_i}=O_K\big]
where r_i \geq 0
and r_1+\cdots +r_K\leq n
.
The jointprobs
function estimates these probabilities under various settings.
Note that when some of the r_i
's equal zero, then no restriction on the number of outcomes of the
corresponding type are imposed, so the resulting probabilities are marginal.
jointprobs(cmdata, type = c("averaged", "cluster", "mc"))
cmdata 
a 
type 
character string describing the desired type of estimate:

a list with an array of estimates for each treatment. For a multinomial distribution with
K+1
categories the arrays will have either K+1
or K dimensions, depending on whether
clustersize specific estimates (type="cluster"
) or pooled estimates
(type="averaged"
or type="mc"
) are requested. For the clustersize specific estimates
the first dimension is the clustersize. Each additional dimension is a possible outcome.
mc.est
for estimating the distribution under marginal compatibility,
uniprobs
and multi.corr
for extracting the univariate marginal event
probabilities, and the withinmultinomial correlations from the joint probabilities.
data(dehp)
# averaged over clustersizes
tau.ave < jointprobs(dehp, type="ave")
# averaged P(X1=X2=O1, X3=O2) in the 1500 dose group
tau.ave[["1500"]]["2","1"] # there are two type1, and one type2 outcome
#plot P(X1=O1)  the marginal probability of a type1 event over clustersizes
tau < jointprobs(dehp, type="cluster")
ests < as.data.frame(lapply(tau, function(x)x[,"1","0"]))
matplot(ests, type="b")