brute {expperm}R Documentation

Brute-force calculation of an expected permutation matrix

Description

Computes an expected permutation matrix and marginal likelihood from a matrix of assignment likelihoods. The function literally enumerates all permutations so will be impractial for matrices with more than 10 rows.

Usage

brute(A, return.permanent = FALSE)

Arguments

A

A matrix of assignment likelihoods.

return.permanent

A logical value indicating whether the function should also return the permanent of A, which is then added to the output as an attribute.

Value

E(P), the expected permutation matrix corresponding to A.

Examples

data(A)
brute(A)

[Package expperm version 1.6 Index]