jointprobs {CorrBin} | R Documentation |
Estimate joint event probabilities for multinomial data
Description
An exchangeable multinomial distribution with categories
, can be
parameterized by the joint probabilities of events
where and
.
The
jointprobs
function estimates these probabilities under various settings.
Note that when some of the 's equal zero, then no restriction on the number of outcomes of the
corresponding type are imposed, so the resulting probabilities are marginal.
Usage
jointprobs(cmdata, type = c("averaged", "cluster", "mc"))
Arguments
cmdata |
a |
type |
character string describing the desired type of estimate:
|
Value
a list with an array of estimates for each treatment. For a multinomial distribution with
categories the arrays will have either
or K dimensions, depending on whether
cluster-size specific estimates (
type="cluster"
) or pooled estimates
(type="averaged"
or type="mc"
) are requested. For the cluster-size specific estimates
the first dimension is the cluster-size. Each additional dimension is a possible outcome.
See Also
mc.est
for estimating the distribution under marginal compatibility,
uniprobs
and multi.corr
for extracting the univariate marginal event
probabilities, and the within-multinomial correlations from the joint probabilities.
Examples
data(dehp)
# averaged over cluster-sizes
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 type-1, and one type-2 outcome
#plot P(X1=O1) - the marginal probability of a type-1 event over cluster-sizes
tau <- jointprobs(dehp, type="cluster")
ests <- as.data.frame(lapply(tau, function(x)x[,"1","0"]))
matplot(ests, type="b")