Learn R Programming

deal (version 1.1-15)

jointprior: Calculates the joint prior and the quantities needed to specify local parameter priors

Description

Given a network with a prob attribute for each node, the joint probability distribution is derived. Then the quantities needed in the local master procedure for finding the local parameter priors are deduced.

Usage

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

Arguments

nw
A network. Each node must have a prob attribute to describe the local probability distribution, see network.
N
The size of the imaginary data base. If this is too small, errors might occur. If no N is given, the procedure tries to set a value as low as possible.
phiprior
The way of specifying the prior for phi. Either phiprior="bottcher" or phiprior="heckerman" can be used.
timetrace
If TRUE, prints some timing information on the screen.

Value

  • A list with the following elements
  • jointalphaUsed in local master procedure for discrete variables.
  • jointnuUsed in local master procedure for continuous variables.
  • jointrhoUsed in local master procedure for continuous variables.
  • jointmuUsed in local master procedure for continuous variables.
  • jointsigmaSigma matrices (not used in further calculations).
  • jointphiUsed in local master procedure for continuous variables.

Details

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 e.g. Shachter and Kenley (1989). Then, jointalpha, jointnu, jointrho, mu and jointphi are deduced. These quantities are later used for deriving local parameter priors. For the configuration i of the discrete variables, $$\nu_i=\rho_i=\alpha_i$$ and $$\phi_i = (\nu_i -1)\Sigma_i$$ if phiprior="bottcher" and $$\phi_i = \nu_i(\rho_i -2)\Sigma_i/(\nu_i+1)$$ if phiprior="heckerman".

References

Shachter and Kenley (1989), Gaussian influence diagrams. Management Science 35:527--550. Further information about Deal can be found at: http://www.math.auc.dk/novo/deal.

See Also

network

Examples

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

Run the code above in your browser using DataLab