Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

prob

Local probability distributions


Description

Methods for accessing or changing the local probability distributions and for accessing the local prior and posterior distributions

Usage

prob(x,df,...)

## S3 method for class 'node'
 prob(x,df,nw,...)
## S3 method for class 'network'
 prob(x,df,...)

localprob(nw)
localprob(nw,name) <- value

localprior(node)
localposterior(node)

Arguments

x

an object of class node or network.

df

a data frame, where the columns define the variables. A continuous variable should have type numeric and discrete varibles should have type factor.

nw

an object of class network.

node

an object of class node.

name

a string, which gives the node name.

...

additional arguments for specific methods.

value

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, it is a matrix with a row for each configuration of the discrete parents. If the node is discrete, it is a multiway array which gives the conditional probability distribution for each configuration of the discrete parents.

Details

The 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.

Author(s)

Susanne Gammelgaard Bottcher,
Claus Dethlefsen rpackage.deal@gmail.com.


deal

Learning Bayesian Networks with Mixed Variables

v1.2-39
GPL (>= 2)
Authors
Susanne Gammelgaard Bottcher, Claus Dethlefsen.
Initial release
2018-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.