jointprior {deal}  R Documentation 
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.
jointprior(nw,N=NA,phiprior="bottcher",timetrace=FALSE)
nw 
an object of class 
N 
an integer, which gives the size of the imaginary data base. If
this is too small,

phiprior 
a string, which specifies how the prior for phi is
calculated. Either 
timetrace 
a logical. If 
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 Bottcher(2001) and
phi[i] = nu[i](rho[i] 2)Sigma[i]/(nu[i]+1)
if phiprior="heckerman"
, see Heckerman, Geiger and Chickering (1995).
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. 
Susanne Gammelgaard Bottcher,
Claus Dethlefsen rpackage.deal@gmail.com.
Bottcher, S.G. (2001). Learning Bayesian Networks with Mixed Variables, Artificial Intelligence and Statistics 2001, Morgan Kaufmann, San Francisco, CA, USA, 149156.
Heckerman, D., Geiger, D. and Chickering, D. (1995). Learning Bayesian networks: The combination of knowledge and statistical data. Machine Learning, 20: 197243.
Shachter, R.D. and Kenley, C.R. (1989), Gaussian influence diagrams. Management Science, 35:527550.
data(rats) rats.nw < network(rats) rats.prior < jointprior(rats.nw,12) ## Not run: savenet(rats.nw,file("rats.net")) ## Not run: rats.nw < readnet(file("rats.net")) ## Not run: rats.nw < prob(rats.nw,rats) ## Not run: rats.prior < jointprior(rats.nw,12)