Skip to main content
. 2023 Oct 24;23(21):8678. doi: 10.3390/s23218678
Algorithm 1 The iterative imputation based on multivariate regression model
Input: Xk1Rmk×n, nlong_j
Output: The imputed data segment Xk2Rmk×n
1. Begin
  • 2.

    Calculate the variable missing proportion VMPj for each long-term missing variable, and sort these variables in ascending order by VMPj, get x_ ,1,(x_ ,2),,x_ ,nlong_j;

3. Set X0=Xk(1);
4. For j=1 to nlong_j:
  • 5.

       Split Xj1 into a training dataset Dtrain(j1) including only complete variables and a testing dataset Dtest(j1) including only incomplete variables;

  • 6.

       Train the multivariate regression model modelj by inputting Xtrain(j1) formed by nnlong_j+(j1) complete variables from Dtrain(j1);

  • 7.

       Input Xtest(j1) formed by nlong_j(j1) incomplete variables from Dtest(j1) into modelj, and get the predicted values (x~_ , j) for variable (x_,j);

8.    Impute Xj1 using (x~_ , j);
9.    Set Xj=Xj1;
10. Return Xk(2)=Xnlong_j;
11. End