Learn R Programming

CorrBin (version 1.6.2)

uniprobs: Extract univariate marginal probabilities from joint probability arrays

Description

Calculates the marginal probability of each event type for exchangeable correlated multinomial data based on joint probability estimates calculated by the jointprobs function.

Usage

uniprobs(jp, type = attr(jp, "type"))

Value

a list of estimated probability of each outcome by treatment group. The elements are either matrices or vectors depending on whether cluster-size specific estimates were requested (type="cluster") or not.

Arguments

jp

the output of jointprobs - a list of joint probability arrays by treatment

type

one of c("averaged","cluster","mc") - the type of joint probability. By default, the type attribute of jp is used.

See Also

jointprobs for calculating the joint probability arrays

Examples

Run this code
data(dehp)
tau <- jointprobs(dehp, type="averaged")
uniprobs(tau)

#separately for each cluster size
tau2 <- jointprobs(dehp, type="cluster")
uniprobs(tau2)

Run the code above in your browser using DataLab