prob
attribute for each node, the
joint prior distribution of the parameters is derived.jointprior(nw,N=NA,phiprior="bottcher",timetrace=FALSE,smalldf=NA)
jointdisc(nw,timetrace=FALSE)
jointcont(nw,timetrace=FALSE)
prob
attribute to describe the local probability distribution, see
network
.N
is given, the procedure tries to
set a value as low as possible.phiprior="bottcher"
or phiprior="heckerman"
can be used.TRUE
, prints some timing information on the
screen.timeslice
.jointalpha
is determined by multiplying
each entry in the joint probability distribution by the size of the
imaginary database N
.
For the mixed part of the network, for each configuration of the discrete
variables, the joint (Gaussian) distribution of the continuous
variables are constructed and is 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 parentes). 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 eg. Shachter and Kenley (1989).
Then, the joint distribution of the
parameters are deduced and expressed by jointalpha
for the
Dirichlet distribution; jointnu
, jointrho
, mu
and
jointphi
for the Gaussian-inverse Wishart distribution.
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"
.network
data(rats)
rats.nw <- network(rats)
rats.prior <- jointprior(rats.nw,12)
Run the code above in your browser using DataLab