addarrow                package:deal                R Documentation

_A_d_d_i_n_g/_T_u_r_n_i_n_g/_R_e_m_o_v_i_n_g _a_r_r_o_w_s

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

     Create all networks with exactly one arrow added/turned/removed.

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

     addarrow   (nw,df,prior,trylist=vector("list",nw$n)) 
     turnarrow  (nw,df,prior,trylist=vector("list",nw$n)) 
     removearrow(nw,df,prior,trylist=vector("list",nw$n)) 

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

      nw: an object of class `network', from which arrows are
          added/removed/turned.

      df: 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:

     Given the starting network, a list of networks is created with
     exactly one arrow added/turned/removed. All possible networks
     (with the restrictions described in `insert') are returned in the
     list of networks. All networks are learned with the data in `df'
     using the prior information in `prior'. The functions are used by
     `autosearch'.

_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:

     `heuristic', `autosearch', `insert', `addarrows', `network',
     `networkfamily'

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

     data(rats)
     fit        <- network(rats)
     fit.prior  <- jointprior(fit,12)
     fit        <- learn(fit,rats,fit.prior)$nw
     rats.extra <- addarrow(fit,rats,fit.prior)$nw
     plot(rats.extra)
     rats.extra2<- addarrow(rats.extra[[2]],rats,fit.prior)$nw
     plot(rats.extra2)
     rats.extra3<- turnarrow(rats.extra2[[2]],rats,fit.prior)$nw
     plot(rats.extra3)
     rats.extra4<- removearrow(rats.extra2[[2]],rats,fit.prior)$nw
     plot(rats.extra4)

