localmaster: Local master
Description
Calculates the joint distribution of a node and its parents
from the joint prior.Usage
localmaster(family,nw,prior=jointprior(nw))
printmaster(nw,prior=jointprior(nw))
Arguments
family
Indices of node and parents of the node.
Details
Called by cond.node.
For the discrete part of the
network, the master is the marginal distribution of the discrete nodes
in the family.
For the mixed part of the network, for each configuration $i$ of the
discrete variables in family, the joint parameter priors are given
by jointprior as
$$p(m_i|\Sigma_i) = N(\mu_i,\Sigma_i/\nu_i)$$
$$p(\Sigma_i) = IW(\rho_i,\Phi_i)$$
where IW denotes the inverse Wishart distribution.
Then, the local master for configuration $i$ is deduced for the
family $A$ as
$$\Sigma_{A\cap\Gamma|i_{A\cap\Delta}} \sim IW(\rho_{i_{A\cap\Delta}},\tilde\Phi_{A\cap\Gamma|i_{A\cap\Delta}})$$
$$m_{A\cap\Gamma|i_{A\cap\Delta}}|\Sigma_{A\cap\Gamma|i_{A\cap\Delta}} \sim N(\bar\mu_{A\cap\Gamma|i_{A\cap\Delta}},
\Sigma_{A\cap\Gamma|i_{A\cap\Delta}}/\nu_{A\cap\Delta})$$
where $\Gamma$ is the set of continuous nodes and
$\Delta$ is the set of discrete nodes. Furthermore,
$$\rho_{i_{A\cap\Delta}} = \sum_{j:j_{A\cap\Delta}=i_{A\cap\Delta}} \rho_j$$
and likewise for $\nu_{i_{A\cap\Delta}}$
and $\Phi_{i_{A\cap\Delta}}$. Finally,
$$\bar\mu_{A\cap\Delta= (
\sum_{j:j_{A\cap\Delta}=i_{A\cap\Delta}}\mu_j\nu_j
)/\nu_{i_{A\cap\Delta}}
}$$
$$\tilde\Phi_{A\cap\Gamma|i_{A\cap\Delta}}= \Phi_{i_{A\cap\Delta}} +
\sum_{j:j_{A\cap\Delta}=i_{A\cap\Delta}}
\nu_j(\mu_j - \bar\mu_{i_{A\cap\Delta}})
(\mu_j - \bar\mu_{i_{A\cap\Delta}})^\top$$References
Further information about Deal can be found at:
http://www.math.auc.dk/novo/deal.