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/CBNplotTest documentation built on Nov. 18, 2022, 8:05 a.m.