localmaster: Local master
Description
Joint distribution of a node and its parents
from the joint prior.Usage
localmaster(family,nw,prior=jointprior(nw))
Arguments
family
vector of integers, giving indices of node and parents of the node.
prior
a list describing parameter priors, generated by
jointprior. deqn
$$\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$$Details
The procedure is intended for internal use and is 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}}$$References
Further information about deal can be found at:
http://www.math.auc.dk/novo/deal.