uniprobs {CorrBin}R Documentation

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"))

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.

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.

See Also

jointprobs for calculating the joint probability arrays

Examples

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

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

[Package CorrBin version 1.6.1 Index]