makesimprob | R Documentation |

Creates local probability distributions reflecting the
graph of the network. These are attached as a `simprob`

property
to each node in the network and can be edited and used for
`rnetwork`

.

makesimprob(nw, s2=function(idx,cf) { cf <- as.vector(cf) xs <- (1:length(cf)) log(xs%*%cf+1) }, m0=function(idx,cf) { cf <- as.vector(cf) xs <- (1:length(cf))^2 .69*(xs%*%cf) }, m1=function(idx,cf) { cf <- as.vector(cf) xs <- (1:length(cf))*10 idx*(cf%*%xs) })

`nw` |
an object of class |

`s2` |
function that returns the variance as a function of the node index and the configuration of the discrete variables. |

`m0` |
function that returns the intercept as a function of the node index and the configuration of the discrete variables. |

`m1` |
function that returns the regression coefficients as a function of the node index and the configuration of the discrete variables. |

For each node, the local `simprob`

is determined. If the node is
discrete, the probability distribution is uniform (and thus not
reflecting the dependence in the graph, as it should). If the node is
continuous, one mean and variance is attached per configuration of the
discrete parents. The mean depends on the continuos parents and is the
regression coefficients determined by the functions `m0`

(intercept) and `m1`

(regression coefficients). The variance is
determined by the function `s2`

.

The network object `nw`

, where each node has attached the
property `simprob`

.

Susanne Gammelgaard Bottcher,

Claus Dethlefsen rpackage.deal@gmail.com.

`rnetwork`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.