marginal: Compute the marginal probability, GMM under the Hamming...

Description Usage Arguments Value References Examples

View source: R/PerMallows.R

Description

Compute the marginal probability, GMM under the Hamming distance, of a distance decomposition vector for which some positions are known and some are not

Usage

1
marginal(h, theta)

Arguments

h

n dimensional distance decomposition vector where h_j = 0 means that $j$ is a fixed point, h_j = 1 means that $j$ is an unfixed point and otherwise $j$ is not known

theta

n dimensional distance decomposition vector with the dispersion parameters

Value

The marginal probability

References

"Ekhine Irurozki, Borja Calvo, Jose A. Lozano (2016). PerMallows: An R Package for Mallows and Generalized Mallows Models. Journal of Statistical Software, 71(12), 1-30. doi:10.18637/jss.v071.i12"

Examples

1
2
marginal(c(1,0,1,NA,NA), c(0.1, 0.3, 0.7, 0.1, 1))
marginal(c(NA,0,1,NA,NA,0), c(0.1, 0.3, 0.7, 0.1, 0.7, 1))

Example output

Loading required package: Rcpp
[1] 0.1196259
[1] 0.05940863

PerMallows documentation built on May 2, 2019, 6:14 a.m.