Learn R Programming

deal (version 1.1-1)

makesimprob: Make a suggestion for simulation probabilities

Description

Creates local probability distributions reflecting the graph of the network. These are attached as a simprob attribute to each node in the network and can be edited and used for simulation.

Usage

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

Arguments

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

Value

  • The network where each node has attached the attribute simprob.

Details

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.

References

Further information about Deal can be found at: http://www.math.auc.dk/novo/deal.

See Also

simulation