## 3 Modeling and Parameter Estimation in CSADT
### Parameter Estimation
The log-likelihood function unknown parameters \(\widetilde{\Theta}=\left\{\mu_{q},\sigma_{\eta}^{2},\widetilde{\kappa},b, \theta,\widetilde{\sigma_{\varepsilon}^{2}}\right\}\) are described in Equation (24). \[ \begin{split}\ln L\left(\widetilde{\Theta}|\mathbf{Y}\right)& =-\frac{Nm}{2}\ln(2\pi)-\frac{N\ln\left(\sigma_{\eta}^{2}\right)}{2}-\frac{1 }{2}\sum\limits_{i=1}^{N}\ln\left|\widetilde{\Sigma}_{k}\right|\\ &-\frac{1}{2\sigma_{\eta}^{2}}\sum\limits_{k=1}^{d}\sum\limits _{i=1}^{m_{k}}\left(\mathbf{Y}_{ik}-\mu_{q}\exp(-b/S_{k})\Lambda\right)^{ \prime}\cdot\widetilde{\Sigma}_{k}^{-1}\cdot\left(\mathbf{Y}_{ik}-\mu_{q}\exp (-b/S_{k})\Lambda\right)\end{split}  \tag{24}\]  
By using the differential log-likelihood function in Equation (24) with respect to \(\mu_{q}\), \(\sigma_{\eta}^{2}\) yields, we have  
\[ \begin{split}&\frac{\partial\ln L\left(\widetilde{\Theta}| \mathbf{Y}\right)}{\partial\mu_{q}}\\ &=\frac{1}{\sigma_{\eta}^{2}}\sum\limits_{i=1}^{d}\exp(-b/S_{k}) \Lambda^{\prime}\widetilde{\Sigma}_{k}^{-1}\mathbf{Y}_{ik}-\mu_{q}\sum\limits _{k=1}^{m_{k}}\exp(-2b/S_{k})\Lambda^{\prime}\widetilde{\Sigma}_{k}^{-1} \cdot\left(\mathbf{Y}_{ik}-\mu_{q}\exp(-b/S_{k})\Lambda\right)\\ &=-\frac{1}{2\sigma_{\eta}^{2}}Nm+\frac{1}{2\sigma_{\eta}^{2}} \sum\limits_{i=1}^{m_{k}}\left(\mathbf{Y}_{ik}-\mu_{q}\exp(-b/S_{k})\Lambda \right)^{\prime}\widetilde{\Sigma}_{k}^{-1}\cdot\left(\mathbf{Y}_{ik}-\mu_{q} \exp(-b/S_{k})\Lambda\right)\end{split}  \tag{25}\]  
For the special value of \(\left(\widetilde{\kappa},b,\theta,\widetilde{\sigma_{\varepsilon}^{2}}\right)\), the MLE of \(\mu_{q}\), \(\sigma_{\eta}^{2}\) can be obtained by equaling Equation (25) to zero, that is:  
\[ \begin{split}&\hat{\mu}_{q}=\frac{\sum\limits_{k=1}^{d}\sum \limits_{i=1}^{m_{k}}\exp(-b/S_{k})\Lambda^{\prime}\widetilde{\Sigma}_{k}^{-1} \mathbf{Y}_{ik}}{2}\\ &\hat{\sigma}_{\eta}^{2}=\frac{1}{Nm}\sum\limits_{k=1}^{d}\sum \limits_{i=1}^{m_{k}}\left(\mathbf{Y}_{ik}-\mu_{q}\exp(-b/S_{k})\Lambda\right)^{ \prime}\widetilde{\Sigma}_{k}^{-1}\cdot\left(\mathbf{Y}_{ik}-\mu_{q}\exp(-b/S_ {k})\Lambda\right)\end{split}  \tag{26}\]  
Substituting Equation (26) into Equation (24), the log-likelihood function can be deduced in Equation (27). \[\ln L\left(\widetilde{\Theta}|\mathbf{Y}\right)=-\frac{Nm\left(\ln(2\pi)+1+ \ln\left(\sigma_{\eta}^{2}\right)\right)}{2}-\frac{1}{2}\sum\limits_{k=1}^{d} \sum\limits_{i=1}^{m_{k}}\ln\left|\widetilde{\Sigma}_{k}\right| \tag{27}\]  
The MLE for \(\widetilde{\kappa},b,\theta\) and \(\widetilde{\sigma_{\varepsilon}^{2}}\) can be solved by maximizing the log-likelihood function in Equation (27) by a multi-dimensional search of Fminsearch in Matlab. Because the Fminsearch algorithm is sensitive to initial values, we can obtain the initial values by the least square method in [25]. Then, substituting them into Equation (26), \(\mu_{q}\) and \(\sigma_{\eta}^{2}\) can be obtained. The value of \(\kappa\) and \(\sigma_{\varepsilon}^{2}\) can be got by Equation (28):  
\[ \begin{split}\hat{\kappa}&=\hat{\kappa}\cdot\partial_{ \eta}^{2}\\ \partial_{\varepsilon}^{2}&=\hat{\sigma_{\varepsilon}^{2 }}\cdot\partial_{\eta}^{2}\end{split}  \tag{28}\]