bp: MCMC with bipartite graph

Description Usage Arguments Details Value Examples

View source: R/bp.R

Description

MCMC with bipartite graph

Usage

1
2
3
bp(whole, part, edge, alpha = 0.05, gamma = 0.2, p = 0.01,
  nburn = 10000, ngen = 100000, sub = 1000, penalty = 2,
  initial = c("inactive", "random", "high"))

Arguments

whole

Vector of character strings with names of whole nodes (gene-sets)

part

Vector of 0's and 1's indicating active part nodes; names are the names of the part nodes (genes)

edge

Matrix with two columns; each row indicates an edge between a whole node and a part node

alpha

Parameter alpha (0 < alpha < gamma < 1)

gamma

Parameter gamma (0 < alpha < gamma < 1)

p

Parameter p (0 < p < 1)

nburn

Number of burn-in generations

ngen

Number of sample generations

sub

Subsample rate for burn-in and sample files

penalty

Penalty per illegal node to loglikelihood

initial

Initial state (see Details)

Details

The initial argument can take one of three values: "inactive" - all whole nodes inactive; "random" - all whole nodes active with probability p, no illegal nodes; or "high" - all nodes with proportion of connected part nodes with response equal to 1 above 0.4 are active, no illegal nodes.

Value

data frame with "whole" results;

Name

The names of whole nodes

ActiveProbability

The marginal posterior probabilities of whole nodes

Count

Number of active samples for each whole node

Sample

Number of generated samples for each whole node

Degree

The degree of each whole node

Response

The response of each whole node

dimburn + sample detail are included as an attribute, "samples", which is a matrix.

Examples

1
2
3
4
5
6
7
data(t2d)

## eout <- I2edge(t2d$I)

## bp.out <- bp(whole=colnames(t2d$I), part=t2d$y, edge=eout,
## alpha=0.00019, gamma=0.023, p=0.0033,
## nburn=1000000, ngen=10000000, sub=1000, penalty=5, initial="random")

wiscstatman/Rolemodel documentation built on May 28, 2017, 4:34 a.m.