TITLE:	testing the pilot solution

DATA:	FILE IS motivation all.dat;

VARIABLE:
	NAMES ARE   COUNTRY SCHOOLID CLASSID STUDID GRADE 
	Gender Age LANG Books mot1 mot2 mot3 mot4 mot5 mot6 mot7 
    	mot8 mot9 mot10 mot11 mot12 mot13 mot14 mot15 mot15R 
	mot16 mot17 mot17R mot18 mot19 mot19R mot20 mot21 mot21R 
	mot22 mot23 mot24 mot25 mot25R mot26 mot27 mot28 mot29 
	mot30 mot31 mot32;

usevar = mot1 mot3 mot5 mot7 mot9 
        mot11 mot13 mot8 mot10
		mot12 mot28 mot30 mot27 mot4 mot32
		mot22 mot24 mot20 mot14 mot18
		mot26 mot19R mot31 mot29 mot17R;

CATEGORICAL ARE mot1 mot3 mot5 mot7 mot9  
        mot11 mot13 mot8 mot10
		mot12 mot28 mot30 mot27 mot4 mot32
		mot22 mot24 mot20 mot14 mot18
		mot26 mot19R mot31 mot29 mot17R;

CLUSTER IS SCHOOLID;
  IDVARIABLE = STUDID;
  MISSING ARE ALL(99999); 

  ANALYSIS: TYPE IS COMPLEX;
            ESTIMATOR IS WLSMV;
  MODEL:  f1 BY mot1 mot3 mot5 mot7 mot9; !interest
          f2 BY mot11 mot13 mot8 mot10 mot32; ! Relative cost 
          f3 BY mot12 mot28 mot30 mot27 mot4; ! Attainment
          f4 BY mot22 mot24 mot20 mot14 mot18; !Utility 
          f5 BY mot26 mot19R mot31 mot29 mot17R; ! Perc competence

            f1-f5 with f1-f5;

OUTPUT: SAMPSTAT STDYX TECH4 modindices(all);