Description Usage Arguments Details Value Author(s) See Also Examples
Absorb a single piece or a spectrum of evidence for one or more phenotype nodes, propagate the beliefs, obtain the updated beliefs and quantify the effects.
1 2 3 4 5 | ## For Conditional Gaussian Bayesian Networks
## and Discrete Bayesian Networks (Implements RHugin)
absorb.gnbp(object, node, evidence)
## For Discrete Bayesian Networks (Implements gRain)
absorb.dbn(object, node, evidence)
|
object |
an object of class "gpfit" (output from |
node |
a character vector specifying the names of the nodes for which the evidence is to be absorbed. |
evidence |
a matrix or a numeric vector of evidence. number of rows of the matrix or the length of the vector should be equal to the length of |
The function absorb.gnbp
is compatible with the output produced by fit.gnbp
. It absorbs evidence in both conditional gaussian bayesian networks or discrete bayesian networks inferred by RHugin and propagates beliefs by the PC algorithm implemented in the RHugin
package. Jeffrey's Signed information is calculated to quantify the effects of the evidence absorption on the marginals. Note that the demo version of HuginLite is restricted to 50 states and 500 cases.
The function absorb.dbn
is compatible with the output produced by fit.dbn
. It absorbs evidence in only discrete bayesian networks that are inferred by bnlearn
. Belief propagation is implemented using gRain
package.
absorb.gnbp
returns an object of class "gnbp" while absorb.dbn
returns an object of class "dbn". An object of class "gnbp" or "dbn" is a list containing the following components.
gp |
an RHugin domain (for |
gp_flag |
type of network. |
node |
a character vector specifying the nodes for which evidence has been absorbed |
marginal |
a list of marginal probabilities for phenotypes ( |
belief |
a list of updated beliefs for phenotypes ( |
JSI |
a matrix of Jeffrey's signed information if network is |
FC |
a list of two. a matrix |
The marginals, beliefs and JSI or FC are calculated for only d-connected nodes.
If a sequence of evidence is absorbed for a single node in a Conditional Gaussian network, a plot of JSI
vs evidence
is produced.
Janhavi Moharil <janhavim@buffalo.edu>
gen.evidence
, plot.gnbp
, plot.dbn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## load the mouse kidney eQTL dataset
data(mouse)
## get genotype and phenotype data
mousegeno<-mouse[,1:5]
mousepheno<-mouse[,6:19]
## Not run:
## Simple example : Fit a bayesian network to genotype-phenotype data
mouse.cgbn<-fit.gnbp(mousegeno,mousepheno,alpha=0.1)
## Absorb a single evidence for a single node
absorb.gnbp(mouse.cgbn,node="Tlr12",evidence=matrix(2.5))
## Absorb a sequence of evidence for a single node generated using \code{\link{gen.evidence}
mouse.cgbn<-fit.gnbp(mousegeno,mousepheno,alpha=0.1)
evidence<-gen.evidence(mouse.cgbn,node="Tlr12")
absorb.gnbp(mouse.cgbn,node="Tlr12",evidence=evidence)
##Absorb sequence of evidence for multiple nodes}
mouse.cgbn<-fit.gnbp(mousegeno,mousepheno,alpha=0.1)
evidence<-gen.evidence(mouse.cgbn,node=c("Ak2","Ptp4a2","Hmgcl"),std=2,std.equal=TRUE)
absorb.gnbp(mouse.cgbn,node=rownames(evidence),evidence=evidence)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.