Learn R Programming

geneNetBP (version 2.0.1)

gen.evidence: Generate a sequence of evidence for a continuous node in a conditional gaussian bayesian network.

Description

The evidence for a node in an RHugin domain is generated as a linear sequence within the specified standard deviation from the marginal mean of the node. The evidence can be given as an input to absorb.gnbp

Usage

gen.evidence(gpfit, node, std = 2, length.out = 10, std.equal = TRUE)

Arguments

gpfit
an object of class "gpfit" obtained by using fit.gnbp
node
a character string specifying the name of a continuous node in the domain
std
a numeric value specifying the number of standard deviations of marginal distribution within which the evidence is generated. A numeric vector of length = number of nodes, must be specified when std.equal=FALSE.
length.out
a positive integer giving the desired length of the sequence.
std.equal
a logical value indicating whether same number of standard deviations should be used to generate evidence for all nodes. Default is TRUE.

Value

A matrix of evidence for each specified node

Details

The evidence for a node in an RHugin domain is generated as a linear sequence within the specified standard deviation from the marginal mean of the node. The evidence can be given as an input to absorb.gnbp

See Also

absorb.gnbp,fit.gnbp

Examples

Run this code

##Fit a network
data(mouse)
## Not run: 
# mouse.cgbn<-fit.gnbp(mouse[,1:5],mouse[,6:19],alpha=0.1)
# 
# ##Generate a sequence of evidence for a single node
# evidence<-gen.evidence(mouse.cgbn,node="Tlr12",std=2,length.out=20)
# ## End(Not run)

Run the code above in your browser using DataLab