addarrows                package:deal                R Documentation

_A_d_d _a_r_r_o_w_s _t_o/_f_r_o_m _n_o_d_e

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

     Create networks with all possible arrows to/from nodes with
     smaller indices added

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

     addarrows(nw, node, data, prior,trylist=vector("list",nw$n))

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

      nw: an object of class `network', in which arrows are inserted.

    node: an integer, giving the index (column number in `data') of the
          node in focus.

    data: a data frame used for learning the network, see `network'.

   prior: a list describing parameter priors, generated by
          `jointprior'.

 trylist: a list, used internally for reusing learning of nodes, see
          `maketrylist'.

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

     Used by `networkfamily' when constructing all possible networks
     for a given node configuration. Tries to insert all possible
     arrows to (from) the node in focus from (to) nodes with smaller
     indices. Each arrow combination gives rise to extra networks. All
     networks are learned with the data in `df' using the prior
     information in `prior'.

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

     A list with two elements 

      nw: an object of class `networkfamily' with all created networks.
          All networks have been learned.

 trylist: an updated list, used internally for reusing learning of
          nodes, see `maketrylist'.

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

     Susanne Gammelgaard Bttcher alma@math.auc.dk, 
     Claus Dethlefsen dethlef@math.auc.dk.

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

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

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

     `networkfamily',`addarrow'

_E_x_a_m_p_l_e_s:

     data(rats)
     rats.nw    <- network(rats)
     rats.prior <- jointprior(rats.nw,12)
     rats.nwl   <- addarrows(rats.nw,3,rats,rats.prior)$nw
     plot(rats.nwl)

