# Analysis of Influencing Characteristics of Biochars for Ammonium Adsorption
## 2 Materials and Methods
### Expectation Maximization
Specifically, if with \(x_{i}^{(k)}\) we denote the data from reference work i with imputed data from the parameters in step k, then \[\mu^{(k+1)}=\frac{1}{n}\sum_{i=1}^{N}x_{i}^{(k)}\] and \[\Sigma^{(k+1)}=\frac{1}{(n-1)}\sum_{i=1}^{N}\Big{(}x_{i}^{(k)}-\mu^{(k+1)} \Big{)}\Big{(}x_{i}^{(k)}-\mu^{(k+1)}\Big{)}^{T}.\]
4. Repeat Steps 2 and 3 until convergence. The converged parameters can be used to directly perform some analysis; for example, principal components can be determined from the eigenvectors of the covariance matrix. This approach was first proposed in [52] and has proven to be a reliable method for efficient principle component analysis, which naturally accommodates missing information in multiple applications [53; 54]. However, using the converged parameters for conditional mean imputation and then performing principal component analysis (PCA) using the imputed data produces nearly identical results but has the benefit of making visual inspection through loading biplots possible. For this reason, the imputed data were used to perform PCA. The imputation, however, is only used as a mechanism to permit analysis using techniques that are not generally amenable to missing data. Strong conclusions concerning variables that are reported in few studies and thus consist primarily of imputed data should thus be avoided. In total, N = 230 observations were collected from literature. Of the possible 9200 observations, 4408 were missing. Initial analysis was carried out using the full set of observations X. However, the degree of non-Gaussianity in the full data combined with the weakness of anticipated trends made this approach inconclusive at best. The analysis was thus restricted to key variables that have been identified in literature as significant influencers of ammonia adsorption (Table 1). This reduced the number of dimensions in the problem from 40 to 9. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline Influencing Factor & [55] & [56] & [57] & [10] & [58] \\ \hline Dosage of biochar & x & & & & \\ \hline pH value of solution & x & x & x & x \\ \hline Biochar particle size & x & & x & & \\ \hline Ammonium concentration in solution & x & & x & & \\ \hline Contact time & x & & & & \\ \hline Surface Area (BET *) & x & x & x & x & x \\ \hline Pyrolysis temperature & x & x & & x & x \\ \hline Competing ions (purity of solution) & x & & x & & x \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Data collection of influencing factors for ammonium adsorption onto biochar from different review studies. All variables were standardized using the available observations. Denote the \(\rm j^{th}\) variable in literature reference i by \(\rm x_{i,j}\),  
\[\rm\widetilde{x}_{i,j}=\left(x_{i,j}-\overline{x}_{j}\right)/\sigma_{j}^{2},\]  
where \(\rm\overline{x}_{j}\) denotes the mean of available observations of variable j, and \(\sigma_{j}^{2}\) denotes the variance of available observations of variable j:  
\[\rm\overline{x}_{j}=\frac{1}{\sum_{i=1}^{N}[j]\in a_{i}]}\sum_{i=1}^{N}x_{ij} [j\in a_{i}]\]  
\[\rm\sigma_{j}^{2}=\frac{1}{\sum_{i=1}^{N}[j]\in a_{i}]}\sum_{i=1}^{N}\left(x_{ ij}-\overline{x}_{j}\right)^{2}[j\in a_{i}]\]  
Here, \([\cdot]\) denotes the Iverson bracket. Once normalized, the EM algorithm was run using \(\mu^{(0)}=0\) (which is known a priori due to the standardization) and using samples of \(\Sigma^{(0)}\) drawn from an inverse Wishart distribution with the same number of degrees of freedom as variables considered and the identity matrix as a scale parameter. The converged covariance estimates using the whole data set did not differ significantly with different initial values of \(\Sigma^{(0)}\). As such, in the interest of reproducibility, the initial estimate was fixed to \(\Sigma^{(0)}=\rm I\). The same procedure was carried out using subsets containing only data from agricultural waste (\(\rm N_{ag.\ waste}=87\)) and wood (\(\rm N_{wood}=53\))--the two largest subsets of material types in the collected data.