rmallowsBlocks: Mallows proposal distribution function with order constraint

Description Usage Arguments Details Value See Also Examples

Description

The rmallows function will propose a new order for the elements of the parameter ref. The list of blocks provided by the user allows to put a constraint on the new order : the elements put inside a block remain together.

Usage

1
rmallowsBlocks(ref, beta, beta2, listblocks)

Arguments

ref

vector - elements of ref must be of the form "N#" where # is a number.

beta

positive - First Mallows temperature. This parameter influences the way the blocks are mixed.

beta2

positive - Second Mallows temperature. This parameter influences the way the elements of the blocks are mixed between them.

listblocks

list - A list of blocks. Listblocks is of the form (c("N1","N2"),c("N3","N4")), where "N1","N2","N3" and "N4" are elements of ref. An element of a block can't be in another block.

Details

This function is used in the MCMC.GBN function.

Value

The function returns a list of 2 items :

order

order is a vector of integers of the size of ref. It is the order proposed by the rmallowsBlocks function.

new

ref[order] - Vector of ref elements mixed according to the new order.

See Also

MCMC.GBN, rmallows

Examples

1
2
3
4
5
 ref <- c("N1","N2","N3","N4","N5")
 listBlocks <- list(c("N1","N2"),c("N3","N4"))
 r <- rmallowsBlocks(ref, 0.7,0.5,listBlocks)
 r$order
 r$new

andreamrau/GBNcausal documentation built on May 12, 2019, 3:34 a.m.