makesimprob               package:deal               R Documentation

_M_a_k_e _a _s_u_g_g_e_s_t_i_o_n _f_o_r _s_i_m_u_l_a_t_i_o_n _p_r_o_b_a_b_i_l_i_t_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     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)
                               })

_A_r_g_u_m_e_n_t_s:

      nw: an object of class '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.

_D_e_t_a_i_l_s:

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

_V_a_l_u_e:

     The network object 'nw', where each node has attached the property
      'simprob'.

_A_u_t_h_o_r(_s):

     Susanne Gammelgaard Bttcher alma@math.aau.dk, 
      Claus Dethlefsen cld@rn.dk.

_R_e_f_e_r_e_n_c_e_s:

     Further information about *deal* can be found at:
      <URL: http://www.math.aau.dk/~dethlef/novo/deal>.

_S_e_e _A_l_s_o:

     'rnetwork'

