prob(x,df,...)
## S3 method for class 'node':
prob (x,df,nw,...)
## S3 method for class 'network':
prob (x,df,...)
localprob(nw)
value <- localprob(nw,name)
localprior(node)
localposterior(node)
node
or network
.numeric
and discrete varibles
should have type factor
.network
.node
.prob
methods add local
probability distributions to
each node. If the node is continuous, this is a
numeric vector with
the conditional variance and the conditional regression coefficients
arising from a regression on the continuous parents, using data. If
the node has discrete parents, prob
is a matrix with a row
for each configuration of the discrete parents. If the node is
discrete, prob
is a multiway array which gives the conditional
probability distribution for each configuration of the discrete
parents. The generated prob
can be replaced to match the prior
information available.
localprob
returns the probability distribution
for each node in the network.
In a learned network, the local prior and posterior can be accessed
for each node using localprior
and localposterior
.