The ZIP file contains the following files.

(1) EC_data.csv
This file contains the (log-trasformed) degradation data used in the case study of the paper. In the file, each column corresponds to the (transformed) degradation data from the same test rig. For each column, the data are ordered according to the vectorized data \boldsymblo{\mathcal{Y}}_i on Page 7 of the paper, where every three rows represent a degradation observation for the three contaminants.

(2) initial_point.R
- Description:
- The R code finds the initial starting point for the EM algorithm.

- Usage:
- initial.guess(data)

- Arguments:
- data: the degradation data for guessing the starting point.

- Value:
- initial.guess gives the initial starting point for the EM algorithm.

(3) EM.R
- Description:
- The R code implements the EM algorithm to find the maximum likelihood (ML) estimates for the model parameters.

- Usage:
- implementEM(theta.init, data)

- Arguments:
- theta.init: the initial starting point for the EM algorithm, which is obtained from the function initial.guess.
- data: the degradation data for guessing the starting point.

- Value:
- implementEM gives the ML estimates for the model parameters.

(3) interval_estimation.R
- Description:
- The R code computes the Fisher information matrix estimated at the ML estimates. It also provides the code that implements the delta method to calculate the standard error for the bimolecular rate constants.

- Usage:
- obs.info.matrix(theta)
- delta.method(theta, inv.fim)

- Arguments:
- theta: the estimates of model parameters. The ML estimates can be obtained from the function implementEM.
- data: the degradation data for guessing the starting point.
- inv.fim: the inverse of the Fisher information matrix estimated on theta. It can be obtained by inverting the output of the function obs.info.matrix.

- Value:
- obs.info.matrix gives the information matrix estimated on theta. delta.methd gives the standard error of the bimolecular rate constants for the contaminants of interest.

(4) main.R
- Description:
- The R code uses the above functions to make statistical inferences on the emerging contaminant degradation dataset used in the paper.