jointprior               package:deal               R Documentation

_C_a_l_c_u_l_a_t_e_s _t_h_e _j_o_i_n_t _p_r_i_o_r _d_i_s_t_r_i_b_u_t_i_o_n

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

     Given a network with a `prob' property for each node, derives the
     joint probability distribution. Then the quantities needed in the
     local master procedure for finding the local parameter priors are
     deduced.

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

     jointprior(nw,N=NA,phiprior="bottcher",timetrace=FALSE) 
     jointdisc(nw,timetrace=FALSE)
     jointcont(nw,timetrace=FALSE)

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

      nw: an object of class `network'. Each node must have a `prob'
          property to describe the local probability distribution. The
          `prob' property is created using `prob.network', which is
          called by the `network' function.

       N: an integer, which gives the size of the imaginary data base.
          If this is too small,  `NA''s may be created in the output,
          resulting in errors in `learn'. If no `N' is given, the
          procedure tries to  set a value as low as possible.

phiprior: a string, which specifies how the prior for phi is
          calculated. Either `phiprior="bottcher"' or
          `phiprior="heckerman"' can be used.

timetrace: a logical. If `TRUE', prints some timing information on the
          screen.

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

     For the discrete part of the network, the joint probability
     distribution is  calculated by multiplying together the local
     probability distributions. Then, `jointalpha' is determined by
     multiplying each entry in the joint probability distribution by
     the size of the imaginary data base `N'. 

     For the mixed part of the network, for each configuration of the
     discrete variables, the joint Gaussian distribution of the
     continuous variables is constructed and represented by `jointmu'
     (one row for each configuration of the discrete parents) and
     `jointsigma' (a list of matrices - one for each configuration of
     the discrete parents). The configurations of the discrete parents
     are ordered according to `findex'. The algorithm for constructing
     the joint distribution of the continuous variables is described in
     Shachter and Kenley (1989). 

     Then, `jointalpha', `jointnu', `jointrho', `mu' and `jointphi' are
     deduced. These quantities are later used for deriving local
     parameter priors.

     For each configuration `i' of the discrete variables,

                      nu[i]=rho[i]=jointalpha[i]

     and

                     phi[i] = (nu[i] -1)Sigma[i]

     if `phiprior="bottcher"', see Bttcher(2001) and

             phi[i] = nu[i](rho[i] -2)Sigma[i]/(nu[i]+1)

     if `phiprior="heckerman"', see Heckerman, Geiger and Chickering
     (1995).

     The procedures `jointcont' and `jointdisc' are intended for
     internal use only.

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

     A list with the following elements, 

jointalpha: a table used in the local master procedure for discrete
          variables.

 jointnu: a table used in the local master procedure for continuous
          variables.

jointrho: a table used in the local master procedure for continuous
          variables.

 jointmu: a numeric matrix used in the local master procedure for
          continuous variables.

jointsigma: a list of numeric matrices (not used in further
          calculations).

jointphi: a list of numeric matrices used in the local master procedure
          for continuous variables.

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

     Bttcher, S.G. (2001). Learning Bayesian Networks with Mixed
     Variables, {\em Artificial Intelligence and Statistics 2001},
     Morgan Kaufmann, San Francisco, CA, USA, 149-156.

     Heckerman, D., Geiger, D. and Chickering, D. (1995). Learning
     Bayesian networks: The combination of knowledge and statistical
     data. Machine Learning {\bf 20}: 197-243.  

     Shachter, R.D. and Kenley, C.R. (1989), Gaussian influence
     diagrams. Management Science {\bf 35}:527-550.

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

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

     `network', `prob.network'

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

     data(rats)
     rats.nw    <- network(rats)
     rats.prior <- jointprior(rats.nw,12)

     savenet(rats.nw,"rats.net")
     rats.nw <- readnet("rats.net")
     rats.nw <- prob.network(rats.nw,rats)
     rats.prior <- jointprior(rats.nw,12)

