# A Derivation of full conditional distributions

It is straightforward to show that $\pi(\boldsymbol{\beta}\mid \boldsymbol{\Lambda}, \boldsymbol{y}, \boldsymbol{z}, \boldsymbol{X}) \propto \prod_{i=1}^k\prod_{\ell=1}^{p_s + p_\ell} \boldsymbol{\beta}_{i\ell}^{\sum_{j=1}^{n_i} z_{ij\ell} + a -1} (1- \boldsymbol{\beta}_{i\ell})^{n_i -\sum_{j=1} \boldsymbol{z}_{ij\ell} + b -1},$ which means $\boldsymbol{\beta}_{i\ell} \mid \pmb{\Lambda}, \boldsymbol{y}, \boldsymbol{z}, \boldsymbol{X}\stackrel{iid}{\sim} \text{Beta}(\sum_{j=1}^{n_i} z_{ij\ell} + a, n_i - \sum_{j=1}^{n_i} z_{ij\ell} + b).$

Consider the distribution of $$\boldsymbol{z}\mid \boldsymbol{\Lambda}, \boldsymbol{y}, \boldsymbol{\beta}, \boldsymbol{X}.$$ We find that

Remark: $$\boldsymbol{z}_{ij\ell}$$ are all independent conditional on $$\boldsymbol{\Lambda}, \boldsymbol{y}, \boldsymbol{\beta}, \boldsymbol{X}.$$

We now turn to the conditional distribution of $$\boldsymbol{y}\mid \boldsymbol{\Lambda}, \boldsymbol{y}, \boldsymbol{\beta}, \boldsymbol{X}.$$ First, note that each $$\boldsymbol{y}_{j\prime \ell}$$ takes values in the set $$S_\ell,$$ which consists of all values for the $$\ell$$th field that appear anywhere in the data. Then the distribution of $$\boldsymbol{y}_{j\prime \ell} \mid \boldsymbol{\Lambda}, \boldsymbol{y}, \boldsymbol{\beta}, \boldsymbol{X}$$ takes the form $$P(\boldsymbol{y}_{j\prime \ell} = w \mid \boldsymbol{\Lambda}, \boldsymbol{y}, \boldsymbol{\beta}, \boldsymbol{X}) = A_\phi \phi_w$$ for all $$w \in S_\ell,$$ where $$A_\phi = \left (\sum_{w \in S_\ell} \phi_w \right) ^{-1}.$$

Let $$R_j^\prime = \{(i,j) : \lambda_{ij} = j^\prime \}$$ %denote be the set of all records that correspond to individual $j^.$ Then if $$\ell \leq p_s,$$

\begin{align*} \phi_w = \mathop{ \prod_{(i,j) \in R_j^\prime} }_{z_{ij\ell}=1} h_\ell(w) \exp\left\{ -c \mathop{\sum_{(i,j) \in R_j^\prime}}_{z_{ij\ell}=1} d(X_{ij\ell},w) \right\} \alpha_\ell(w) \times \mathop{ \prod_{(i,j) \in R_j^\prime} }_{z_{ij\ell}=0} I(X_{ij\ell} = w). \end{align*}

Simplifying,

$\phi_w = \begin{cases} \displaystyle \alpha_\ell(w) \mathop{ \prod_{(i,j) \in R_j^\prime} }_{z_{ij\ell}=1} \left\{ h_\ell(w) \; \exp\left\{ -c \; d(X_{ij\ell},w) \right\} \right\} \text{if} \; X_{ij\ell} = w \; \forall (i,j) \in R_j^\prime \owns z_{ij\ell} = 0\\ 0 \; \text{otherwise.} \end{cases}$

Hence, if $$\ell \leq p_s,$$ then $$Y_{j^\prime \ell} \mid \boldsymbol{\Lambda}, \boldsymbol{z}, \boldsymbol{\beta}, \boldsymbol{X}$$ has the distribution \begin{align*} P(Y_{j^\prime \ell} = w \mid \boldsymbol{\Lambda}, \boldsymbol{z}, \boldsymbol{\beta}, \boldsymbol{X}) = \frac{ \alpha_\ell(w) \mathop{ \prod_{(i,j) \in R_j^\prime} }_{z_{ij\ell}=1} \left\{ h_\ell(w) \; \exp\left\{ -c \; d(X_{ij\ell},w) \right\} \right\} } { \sum_{w \in S_\ell} \left( \alpha_\ell(w) \mathop{ \prod_{(i,j) \in R_j^\prime} }_{z_{ij\ell}=1} \left\{ h_\ell(w) \; \exp\left\{ -c \; d(X_{ij\ell},w) \right\} \right\} \right) }. \end{align*}

If instead, $$\ell > p_c,$$ then we find that % $P(Y_{j^} = w , , , ) =(w) ({w S_} _(w))^{-1}.$

Regarding, the linkage structure $$\boldsymbol{\Lambda},$$ its full conditional is as follows: % $P(_{ij} = v , , , ) = 0$ if there exists $$\ell$$ such that $$z_{ij\ell} = 0$$ and $$X_{ij\ell} \neq Y_{v\ell}.$$ Otherwise, % $P(\lambda_{ij} = v \mid \boldsymbol{y}, \boldsymbol{z}, \boldsymbol{\beta}, \boldsymbol{X}) \propto \mathop{ \prod_{\ell=1}^{p_s}}_{z_{ij\ell }= 1} \left\{ h_\ell(Y_{v \ell} ) \exp\left\{ -c \; d(X_{ij\ell},Y_{v \ell} ) \right\} \right\}.$

Define $$\Omega_{ij} = \{j^\prime : X_{ij\ell} = Y_{j^\prime \ell} \; \forall \; \ell \owns z_{ij\ell} = 0\}.$$ Then this implies \begin{align*} P(\lambda_{ij} = v \mid \boldsymbol{y}, \boldsymbol{z}, \boldsymbol{\beta}, \boldsymbol{X}) = \frac{ \displaystyle \mathop{ \prod_{\ell=1}^{p_s}}_{z_{ij\ell }= 1} \left\{ h_\ell(Y_{v \ell} ) \exp\left\{ -c \; d(X_{ij\ell},Y_{v \ell} ) \right\} \right\} } { \sum_{v^\prime \in \Omega_{ij}} \left\{ \displaystyle \mathop{ \prod_{\ell=1}^{p_s}}_{z_{ij\ell }= 1} \left\{ h_\ell(Y_{v \ell} ) \exp\left\{ -c \; d(X_{ij\ell},Y_{v \ell} ) \right\} \right\} \right\} }. \end{align*}