uniformBlocks: Uniform proposal law

Description Usage Arguments Value See Also Examples

Description

The uniformBlocks function will propose a new order for the elements of the parameter ref with an uniform sampling. 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. This is the proposal distribuion used in the MCMC.GBN algorithm when the data are observational only.

Usage

1
uniformBlocks(ref, listblocks)

Arguments

ref

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

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.

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 UniformBlocks function.

new

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

See Also

rmallowsBlocks, rmallows

Examples

1
2
3
ref <- c("N1","N2","N3","N4","N5")
listBlocks = list(c("N1","N3"))
uniformBlocks(ref, listblocks = listBlocks)

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