title: imputing missing on X.  
    using information from U, X and Y.

data:
    file = stageA.dat;

variable:
    names = u1-u12 x1-x3 y1-y3 w1-w9 cp1-cp9 n1 n2 mlcjoint;
    usev = x1-x3 y1-y3;
    categorical = y1 y2;
    missing = *; 
    classes = c1(3) c2(3);
    training = w1-w9(bch);

data imputation:
    names = u1-u12(C) x1(c) x2 x3 y1(c) y2(c) y3;
    impute = x1(c) x2;
    ndatasets = 100;
    save = imputed*.dat; ! Not needed
    thin = 100;

analysis:
    type = mixture;
    estimator = mlr;
    starts = 0;

model:
    %overall%
    c2 on c1;
    c1-c2 on x1-x3;
    y1-y3 on x1-x3;
    
model c2:

      %C2#1%

      [y1$1 y2$1 y2$2 y3];

      %C2#2%

      [y1$1 y2$1 y2$2 y3];

      %C2#3%

      [y1$1 y2$1 y2$2 y3];
   
output:
    tech8;
