queryCpDistLw: queryCpDistLw

queryCpDistLwR Documentation

queryCpDistLw

Description

produce a plot of bnlearn::cpdist by performing bnlearn::cpdist on specified node, evidence and level.

Usage

queryCpDistLw(
  fitted,
  candidate,
  evidence,
  levels,
  point = FALSE,
  pointSize = 5,
  alpha = TRUE,
  ...
)

Arguments

fitted

bn.fit object

candidate

name of node

evidence

evidence variable name

levels

level to be listed

point

geom_point the weighted mean

pointSize

point size for geom_point

alpha

whether to reflect the weights by alpha (TRUE) or color (FALSE)

...

other parameters passed to bnlearn cpdist

Value

list of dataframe containing raw values

Examples

library(bnlearn)
data("exampleEaRes")
data("exampleGeneExp")
net <- bngeneplot(exampleEaRes, exampleGeneExp,
                  pathNum=1, returnNet=TRUE)
fitted <- bn.fit(net$av, net$df)
res <- queryCpDistLw(fitted, candidate="ERCC4", evidence="ERCC2",
                     levels=c(0.1, 0.5, 0.8), n=500)

noriakis/CBNplot documentation built on Oct. 10, 2024, 12:21 p.m.