matrix program runs on 22.0 but not on 21

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

matrix program runs on 22.0 but not on 21

msherman

Dear List: I have a matrix program (see bottom on email) that runs correctly when using spss22.0 but when running the program using spss21 I get the following error message(s). The first error message (see below) Error # 12581 A division by zero has been attempted. Execution of this command stops. It there is a zero somewhere then why does the program run without errors in spss22. Thanks,   martin

 

Martin F. Sherman, Ph.D.

Professor of Psychology

Director of  Masters Education in Psychology: Thesis Track

 

Loyola University Maryland

Department of Psychology

222 B Beatty Hall

4501 North Charles Street

Baltimore, MD 21210

 

410-617-2417

[hidden email]

 

 

 

Run MATRIX procedure:

Error encountered in source line #    82

 

Line 80  compute  ww=w*k.

Line 81   compute  t1=ww*t(v).

Line 82.  compute  procrust=loadings*t1.

 

Error # 12581

A division by zero has been attempted.

Execution of this command stops.

Error encountered in source line #    82

 

Error # 12581

A division by zero has been attempted.

Error encountered in source line #    83

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'Q1' is undefined

Error encountered in source line #    83

 

Error # 12366

Undefined operand in DIAG.

Error encountered in source line #    84

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'K1' is undefined

Error encountered in source line #    84

 

Error # 12586

The argument of the MDIAG function is undefined.

Error encountered in source line #    85

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'K' is undefined

Error encountered in source line #    85

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Matrix - 'K' is undefined

Error encountered in source line #    85

 

Error # 12343

Undefined operand in matrix multiply.

Error encountered in source line #    87

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'WW' is undefined

Error encountered in source line #    87

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Matrix - 'WW' is undefined

Error encountered in source line #    87

 

Error # 12343

Undefined operand in matrix multiply.

Error encountered in source line #    88

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'T1' is undefined

Error encountered in source line #    88

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Matrix - 'T1' is undefined

Error encountered in source line #    88

 

Error # 12343

Undefined operand in matrix multiply.

Error encountered in source line #    89

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'PROCRUST' is undefined

Error encountered in source line #    89

 

Error # 12359

Undefined operand for transpose.

Error encountered in source line #    95

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CM1M2' is undefined

Error encountered in source line #    95

 

Error # 12366

Undefined operand in DIAG.

Error encountered in source line #    96

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'PROCRUST' is undefined

Error encountered in source line #    96

 

Error # 12396

Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.

Error encountered in source line #    98

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CSUM2M1' is undefined

Error encountered in source line #    98

 

Error # 12346

Undefined operand for unary operator.

Error encountered in source line #   100

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CSQRTL1' is undefined

Error encountered in source line #   100

 

Error # 12359

Undefined operand for transpose.

Error encountered in source line #   102

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CB' is undefined

Error encountered in source line #   102

 

Error # 12366

Undefined operand in DIAG.

Error encountered in source line #   103

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CA' is undefined

Error encountered in source line #   103

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Matrix - 'CC' is undefined

Error encountered in source line #   103

 

Error # 12347

Undefined operand for binary operator.

Error encountered in source line #   105

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CD' is undefined

Error encountered in source line #   105

 

Error # 12359

Undefined operand for transpose.

Error encountered in source line #   106

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'PROCRUST' is undefined

Error encountered in source line #   106

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Matrix - 'PROCRUST' is undefined

Error encountered in source line #   106

 

Error # 12343

Undefined operand in matrix multiply.

Error encountered in source line #   112

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'RM1M2' is undefined

Error encountered in source line #   112

 

Error # 12366

Undefined operand in DIAG.

Error encountered in source line #   113

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'PROCRUST' is undefined

Error encountered in source line #   113

 

Error # 12422

Undefined source operand for one of the RMAX, RMIN, RSSQ, RSUM.

Error encountered in source line #   115

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'RSUM2M1' is undefined

Error encountered in source line #   115

 

Error # 12346

Undefined operand for unary operator.

Error encountered in source line #   117

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'RSQRTL1' is undefined

Error encountered in source line #   117

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Matrix - 'RSQRTL1' is undefined

Error encountered in source line #   117

 

Error # 12343

Undefined operand in matrix multiply.

Error encountered in source line #   119

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'RB' is undefined

Error encountered in source line #   119

 

Error # 12366

Undefined operand in DIAG.

Error encountered in source line #   120

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'RA' is undefined

Error encountered in source line #   120

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Matrix - 'RC' is undefined

Error encountered in source line #   120

 

Error # 12347

Undefined operand for binary operator.

Error encountered in source line #   122

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CA' is undefined

Error encountered in source line #   122

 

Error # 12363

Undefined operand in the expression inside brackets.

Error encountered in source line #   127

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CC' is undefined

Error encountered in source line #   127

 

Error # 12363

Undefined operand in the expression inside brackets.

Error encountered in source line #   128

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'TOP' is undefined

Error encountered in source line #   128

 

Error # 12396

Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.

Error encountered in source line #   129

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'BOT' is undefined

Error encountered in source line #   129

 

Error # 12396

Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.

Error encountered in source line #   130

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'CTOP' is undefined

Error encountered in source line #   130

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Matrix - 'CBOT' is undefined

Error encountered in source line #   130

 

Error # 12347

Undefined operand for binary operator.

Error encountered in source line #   131

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'PROCRUST' is undefined

Error encountered in source line #   131

 

Error # 12363

Undefined operand in the expression inside brackets.

Error encountered in source line #   137

 

Error # 12492

An attempt has been made to use previously undefined matrix (or scalar).

Execution of this command stops.

Matrix - 'PROCRUST' is undefined

Error encountered in source line #   137

 

Error # 12332

Undefined variable in PRINT.

 

------ END MATRIX -----

 

 

 

matrix.      

compute  loadings={

    -.73,    -.26,    .03,     .15,   -.01;

    -.43,    -.33,   -.08,    -.02,   -.60;

    -.79,    -.30,    .08,     .01,   -.11;

    -.65,    -.48,   -.09,   -.06,    -.05;

    -.78,    -.02,   -.02,   -.12,    -.25;

    -.73,    -.37,   -.01,   -.20,    -.12;

     .21,     .73,     .33,    .24,     .14;

     .15,     .81,     .13,   -.05,    -.02;

     .57,     .50,     .04,    .12,    -.34;

     .25 ,    .62,     .00,    .32,    -.35;

   -.11,     .48,      .48,    .28,    -.28;

     .39,     .67,     .23,    .15,     .06;

   -.19,    -.10,      .71,     -.20,   .01;

    .10,     .19,       .73,    -.02,   .12;

    -.21,    .05,      .68,    .27,    -.21;

     .26,    .22,      .50,    -.32,     .31;

    .15,     .29,      .72,     .00,    -.09;

    -.02,    .02,      .64,    .15,     .08;

     .49 ,   .55,     -.02,   -.07,     .23;

    .34,   -.11,      -.24,    .25,     .63;

    .19,     .39,      .33,    .49,     .41;

    .27 ,    .07,      .03,   -.08,     .81;

   -.25,   -.14,      .01,   -.00,     .67;

   -.15,    .28,      .24,    .65,     .18;

    .66,    .26,      .10,    .51,    -.06;

    .26,   -.07,     -.06 ,   .71,   -.11;

    .60,   .10,      -.04,    .60,     .11;

    .62,    .38,    -.06,     .53,   -.08;

    .65,    .17,    -.02,     .55,    .00;

   .75 ,   -.10,    -.06,    .17,    .11}.

        

                                                                     

compute   norms={    

      .81,    .02,    -.01,     -.01 ,   -.10;

      .63,   -.03,     .01,     -.48,    -.08;

      .80,   -.10,     .02,     -.03,    -.26;

      .73,   -.18,    -.09,      .04,    -.16;

      .49,    .35,     .02 ,    -.21,    -.32;

      .70,   -.15,    -.09 ,     .04,    -.38;

     -.12,    .66,     .18,      .38,    .13;

     -.18,    .66,     .04,      .07,    -.03;

     -.32,    .44,     .23,     -.32,     .32;

      .04,    .54,     .16,     -.27,   .42;

      .00,    .58,     .11,     -.38,    -.06;

     -.04,   .74 ,     .19,      .10 ,   .10;

      .18,   .18 ,     .58,      -.14 ,  -.31;

      .14,    .04,      .73,      .17  ,  .14;

      .37,    .41,      .50,     -.01  ,  .12;

     -.19,    .22,      .57,      .04  ,  -.04;

     -.15,   -.01,      .75,     -.09 ,   .16;

     -.13,    .08,      .49,     -.07 ,   -.15;

     -.35,    .22,      .15,      .56 ,   .03;

     -.03,   -.15,     -.11,      .68,    .24;

     -.06,    .52,     -.05,      .55,    .27;

     -.16,   -.08,      .00,      .77,    .01;

      .19,   -.12,     -.18,      .59,    -.08;

      .04,    .27,      .13 ,     .62,    .00;

     -.41,    .17,      .13 ,     .03,    .64;

     -.04,    .06,     -.19,     .01 ,   .70;

     -.20,   -.04,      .01,     .29 ,   .68;

     -.09,    .23,      .15,    -.13 ,   .74;

     -.33,    .17,     -.08,     .06 ,   .75;

     -.23,   -.29,     -.04 ,   .22 ,   .57}.

 

 

 

                

compute  s=t(loadings)*norms.

compute  w1=s*t(s). 

compute  v1=t(s)*s.             

call eigen(w1,w,evalw1).

call eigen(v1,v,evalv1).

compute  o=t(w)*s*v.

compute  q1=o &/abs(o).

compute  k1=diag(q1).

compute  k=mdiag(k1).

 

compute  ww=w*k.

compute  t1=ww*t(v).

compute  procrust=loadings*t1. 

 

 

comment  the following commands calculate congruence coefficients for the

         factor columns.

 

compute  cm1m2=t(procrust)*norms.                                  

compute  ca=diag(cm1m2).                                             

compute  csum2m1=cssq(procrust).                                   

compute  csum2m2=cssq(norms).                                      

compute  csqrtl1=sqrt(csum2m1).                                     

compute  csqrtl2=sqrt(csum2m2).                                     

                                                                   

compute  cb=t(csqrtl1)*csqrtl2.                                      

compute  cc=diag(cb).                                               

                                                                   

compute  cd=ca&/cc.                                                  

compute  faccongc=t(cd).                                            

                          

 

comment  the following commands calculate congruence coefficients for the

         factor rows.

 

compute  rm1m2=procrust*t(norms).

compute  ra=diag(rm1m2).

compute  rsum2m1=rssq(procrust).

compute  rsum2m2=rssq(norms).

compute  rsqrtl1=sqrt(rsum2m1).

compute  rsqrtl2=sqrt(rsum2m2).

 

compute  rb=rsqrtl1*t(rsqrtl2).

compute  rc=diag(rb).

 

compute  faccongr=ra&/rc.

 

comment  the following commands calculate the overall congruence coefficients

         for the data set.

 

compute  top={ca;ra}.

compute  bot={cc;rc}.

compute  ctop=csum(top).

compute  cbot=csum(bot).

compute  total=ctop/cbot.

 

 

comment  the following commands merge the above matrices into one overall

         matrix that will be printed out.

 

compute  procrust={procrust,faccongr;faccongc,total}.

                                        

print  procrust /title = "FACTOR CONGRUENCE COEFFICIENTS"/format f5.2          

   /clabels= "NEURO"  "EXTRA"  "OPEN"  "AGREE" "CONSC" "ITEMCONG"

   /RLABELS= "N1" "N2" "N3" "N4" "N5" "N6" "E1" "E2" "E3" "E4" "E5"

             "E6" "O1" "O2" "O3" "O4" "O5" "O6" "A1" "A2" "A3" "A4"

             "A5" "A6" "C1" "C2" "C3" "C4" "C5" "C6" "FACTCONG"            

   /space=newpage.                                                

END MATRIX.                                                       

                                                                   

 

Martin F. Sherman, Ph.D.

Professor of Psychology

Director of  Masters Education in Psychology: Thesis Track

 

Loyola University Maryland

Department of Psychology

222 B Beatty Hall

4501 North Charles Street

Baltimore, MD 21210

 

410-617-2417

[hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: matrix program runs on 22.0 but not on 21

Kirill Orlov
There is no division in your lines.
What goes on in line 83?

Reply | Threaded
Open this post in threaded view
|

Re: matrix program runs on 22.0 but not on 21

David Marso
Administrator
In reply to this post by msherman
Martin,
That program fails in version 22 as well (22.0.0.1 64 bit on Doze8.1).
This line is the immediate culprit.

compute  q1=o &/abs(o).

If you inspect the matrix o it shall become obvious why this is the case!
Think about/analyze the operation and it should also become clear how to fix it.
IMNSHO that is some rather sloppy programming.
Since when is it an acceptable practice to perform division without first testing the denominator for 0???
Also, usually the first error in a MATRIX program is sufficient to cause a cascade of errors on anything dependent on the first error.  Hence, no real need to post the entire barrage of messages.
Thanks for including the code so it was very easy to diagnose.
David

msherman wrote
Dear List: I have a matrix program (see bottom on email) that runs correctly when using spss22.0 but when running the program using spss21 I get the following error message(s). The first error message (see below) Error # 12581 A division by zero has been attempted. Execution of this command stops. It there is a zero somewhere then why does the program run without errors in spss22. Thanks,   martin

Martin F. Sherman, Ph.D.
Professor of Psychology
Director of  Masters Education in Psychology: Thesis Track

Loyola University Maryland
Department of Psychology
222 B Beatty Hall
4501 North Charles Street
Baltimore, MD 21210

410-617-2417
[hidden email]<mailto:[hidden email]>



Run MATRIX procedure:
Error encountered in source line #    82

Line 80  compute  ww=w*k.
Line 81   compute  t1=ww*t(v).
Line 82.  compute  procrust=loadings*t1.

Error # 12581
A division by zero has been attempted.
Execution of this command stops.
Error encountered in source line #    82

Error # 12581
A division by zero has been attempted.
Error encountered in source line #    83

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'Q1' is undefined
Error encountered in source line #    83

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #    84

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'K1' is undefined
Error encountered in source line #    84

Error # 12586
The argument of the MDIAG function is undefined.
Error encountered in source line #    85

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'K' is undefined
Error encountered in source line #    85

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'K' is undefined
Error encountered in source line #    85

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    87

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'WW' is undefined
Error encountered in source line #    87

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'WW' is undefined
Error encountered in source line #    87

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    88

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'T1' is undefined
Error encountered in source line #    88

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'T1' is undefined
Error encountered in source line #    88

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    89

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #    89

Error # 12359
Undefined operand for transpose.
Error encountered in source line #    95

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CM1M2' is undefined
Error encountered in source line #    95

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #    96

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #    96

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #    98

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CSUM2M1' is undefined
Error encountered in source line #    98

Error # 12346
Undefined operand for unary operator.
Error encountered in source line #   100

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CSQRTL1' is undefined
Error encountered in source line #   100

Error # 12359
Undefined operand for transpose.
Error encountered in source line #   102

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CB' is undefined
Error encountered in source line #   102

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   103

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CA' is undefined
Error encountered in source line #   103

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'CC' is undefined
Error encountered in source line #   103

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   105

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CD' is undefined
Error encountered in source line #   105

Error # 12359
Undefined operand for transpose.
Error encountered in source line #   106

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   106

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   106

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #   112

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RM1M2' is undefined
Error encountered in source line #   112

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   113

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   113

Error # 12422
Undefined source operand for one of the RMAX, RMIN, RSSQ, RSUM.
Error encountered in source line #   115

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RSUM2M1' is undefined
Error encountered in source line #   115

Error # 12346
Undefined operand for unary operator.
Error encountered in source line #   117

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RSQRTL1' is undefined
Error encountered in source line #   117

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'RSQRTL1' is undefined
Error encountered in source line #   117

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #   119

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RB' is undefined
Error encountered in source line #   119

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   120

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RA' is undefined
Error encountered in source line #   120

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'RC' is undefined
Error encountered in source line #   120

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   122

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CA' is undefined
Error encountered in source line #   122

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   127

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CC' is undefined
Error encountered in source line #   127

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   128

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'TOP' is undefined
Error encountered in source line #   128

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #   129

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'BOT' is undefined
Error encountered in source line #   129

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #   130

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CTOP' is undefined
Error encountered in source line #   130

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'CBOT' is undefined
Error encountered in source line #   130

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   131

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   131

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   137

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   137

Error # 12332
Undefined variable in PRINT.

------ END MATRIX -----



matrix.
compute  loadings={
    -.73,    -.26,    .03,     .15,   -.01;
    -.43,    -.33,   -.08,    -.02,   -.60;
    -.79,    -.30,    .08,     .01,   -.11;
    -.65,    -.48,   -.09,   -.06,    -.05;
    -.78,    -.02,   -.02,   -.12,    -.25;
    -.73,    -.37,   -.01,   -.20,    -.12;
     .21,     .73,     .33,    .24,     .14;
     .15,     .81,     .13,   -.05,    -.02;
     .57,     .50,     .04,    .12,    -.34;
     .25 ,    .62,     .00,    .32,    -.35;
   -.11,     .48,      .48,    .28,    -.28;
     .39,     .67,     .23,    .15,     .06;
   -.19,    -.10,      .71,     -.20,   .01;
    .10,     .19,       .73,    -.02,   .12;
    -.21,    .05,      .68,    .27,    -.21;
     .26,    .22,      .50,    -.32,     .31;
    .15,     .29,      .72,     .00,    -.09;
    -.02,    .02,      .64,    .15,     .08;
     .49 ,   .55,     -.02,   -.07,     .23;
    .34,   -.11,      -.24,    .25,     .63;
    .19,     .39,      .33,    .49,     .41;
    .27 ,    .07,      .03,   -.08,     .81;
   -.25,   -.14,      .01,   -.00,     .67;
   -.15,    .28,      .24,    .65,     .18;
    .66,    .26,      .10,    .51,    -.06;
    .26,   -.07,     -.06 ,   .71,   -.11;
    .60,   .10,      -.04,    .60,     .11;
    .62,    .38,    -.06,     .53,   -.08;
    .65,    .17,    -.02,     .55,    .00;
   .75 ,   -.10,    -.06,    .17,    .11}.


compute   norms={
      .81,    .02,    -.01,     -.01 ,   -.10;
      .63,   -.03,     .01,     -.48,    -.08;
      .80,   -.10,     .02,     -.03,    -.26;
      .73,   -.18,    -.09,      .04,    -.16;
      .49,    .35,     .02 ,    -.21,    -.32;
      .70,   -.15,    -.09 ,     .04,    -.38;
     -.12,    .66,     .18,      .38,    .13;
     -.18,    .66,     .04,      .07,    -.03;
     -.32,    .44,     .23,     -.32,     .32;
      .04,    .54,     .16,     -.27,   .42;
      .00,    .58,     .11,     -.38,    -.06;
     -.04,   .74 ,     .19,      .10 ,   .10;
      .18,   .18 ,     .58,      -.14 ,  -.31;
      .14,    .04,      .73,      .17  ,  .14;
      .37,    .41,      .50,     -.01  ,  .12;
     -.19,    .22,      .57,      .04  ,  -.04;
     -.15,   -.01,      .75,     -.09 ,   .16;
     -.13,    .08,      .49,     -.07 ,   -.15;
     -.35,    .22,      .15,      .56 ,   .03;
     -.03,   -.15,     -.11,      .68,    .24;
     -.06,    .52,     -.05,      .55,    .27;
     -.16,   -.08,      .00,      .77,    .01;
      .19,   -.12,     -.18,      .59,    -.08;
      .04,    .27,      .13 ,     .62,    .00;
     -.41,    .17,      .13 ,     .03,    .64;
     -.04,    .06,     -.19,     .01 ,   .70;
     -.20,   -.04,      .01,     .29 ,   .68;
     -.09,    .23,      .15,    -.13 ,   .74;
     -.33,    .17,     -.08,     .06 ,   .75;
     -.23,   -.29,     -.04 ,   .22 ,   .57}.




compute  s=t(loadings)*norms.
compute  w1=s*t(s).
compute  v1=t(s)*s.
call eigen(w1,w,evalw1).
call eigen(v1,v,evalv1).
compute  o=t(w)*s*v.
compute  q1=o &/abs(o).
compute  k1=diag(q1).
compute  k=mdiag(k1).

compute  ww=w*k.
compute  t1=ww*t(v).
compute  procrust=loadings*t1.


comment  the following commands calculate congruence coefficients for the
         factor columns.

compute  cm1m2=t(procrust)*norms.
compute  ca=diag(cm1m2).
compute  csum2m1=cssq(procrust).
compute  csum2m2=cssq(norms).
compute  csqrtl1=sqrt(csum2m1).
compute  csqrtl2=sqrt(csum2m2).

compute  cb=t(csqrtl1)*csqrtl2.
compute  cc=diag(cb).

compute  cd=ca&/cc.
compute  faccongc=t(cd).


comment  the following commands calculate congruence coefficients for the
         factor rows.

compute  rm1m2=procrust*t(norms).
compute  ra=diag(rm1m2).
compute  rsum2m1=rssq(procrust).
compute  rsum2m2=rssq(norms).
compute  rsqrtl1=sqrt(rsum2m1).
compute  rsqrtl2=sqrt(rsum2m2).

compute  rb=rsqrtl1*t(rsqrtl2).
compute  rc=diag(rb).

compute  faccongr=ra&/rc.

comment  the following commands calculate the overall congruence coefficients
         for the data set.

compute  top={ca;ra}.
compute  bot={cc;rc}.
compute  ctop=csum(top).
compute  cbot=csum(bot).
compute  total=ctop/cbot.


comment  the following commands merge the above matrices into one overall
         matrix that will be printed out.

compute  procrust={procrust,faccongr;faccongc,total}.

print  procrust /title = "FACTOR CONGRUENCE COEFFICIENTS"/format f5.2
   /clabels= "NEURO"  "EXTRA"  "OPEN"  "AGREE" "CONSC" "ITEMCONG"
   /RLABELS= "N1" "N2" "N3" "N4" "N5" "N6" "E1" "E2" "E3" "E4" "E5"
             "E6" "O1" "O2" "O3" "O4" "O5" "O6" "A1" "A2" "A3" "A4"
             "A5" "A6" "C1" "C2" "C3" "C4" "C5" "C6" "FACTCONG"
   /space=newpage.
END MATRIX.


Martin F. Sherman, Ph.D.
Professor of Psychology
Director of  Masters Education in Psychology: Thesis Track

Loyola University Maryland
Department of Psychology
222 B Beatty Hall
4501 North Charles Street
Baltimore, MD 21210

410-617-2417
[hidden email]<mailto:[hidden email]>
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: matrix program runs on 22.0 but not on 21

Bruce Weaver
Administrator
In reply to this post by msherman
I have release 21.0.0.2 (64-bit) running under Windoze 7.  I tried running your code, and got a bunch of errors, one of them being a division by 0.   So I looked at your matrix program to see where the first division is happening.  I think it is this line:

compute  q1=o &/abs(o).

For those not familiar with it, &/ is the element-wise division operator.

Next, I inserted a PRINT command to display matrix "o" BEFORE that problematic COMPUTE line, and followed it with an END MATRIX.  Here's what o looks like before your matrix program hits that COMPUTE:

o-matrix
  7.82   .00   .00   .00   .00
   .00 -3.76   .00   .00   .00
   .00   .00 -2.49   .00   .00
   .00   .00   .00 -1.64   .00
   .00   .00   .00   .00  1.21

All of the off-diagonal cells are zeros.  So that's where your division by 0 is coming from, and I'll bet everything else that goes wrong springs from that.

HTH.


msherman wrote
Dear List: I have a matrix program (see bottom on email) that runs correctly when using spss22.0 but when running the program using spss21 I get the following error message(s). The first error message (see below) Error # 12581 A division by zero has been attempted. Execution of this command stops. It there is a zero somewhere then why does the program run without errors in spss22. Thanks,   martin

Martin F. Sherman, Ph.D.
Professor of Psychology
Director of  Masters Education in Psychology: Thesis Track

Loyola University Maryland
Department of Psychology
222 B Beatty Hall
4501 North Charles Street
Baltimore, MD 21210

410-617-2417
[hidden email]<mailto:[hidden email]>



Run MATRIX procedure:
Error encountered in source line #    82

Line 80  compute  ww=w*k.
Line 81   compute  t1=ww*t(v).
Line 82.  compute  procrust=loadings*t1.

Error # 12581
A division by zero has been attempted.
Execution of this command stops.
Error encountered in source line #    82

Error # 12581
A division by zero has been attempted.
Error encountered in source line #    83

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'Q1' is undefined
Error encountered in source line #    83

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #    84

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'K1' is undefined
Error encountered in source line #    84

Error # 12586
The argument of the MDIAG function is undefined.
Error encountered in source line #    85

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'K' is undefined
Error encountered in source line #    85

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'K' is undefined
Error encountered in source line #    85

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    87

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'WW' is undefined
Error encountered in source line #    87

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'WW' is undefined
Error encountered in source line #    87

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    88

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'T1' is undefined
Error encountered in source line #    88

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'T1' is undefined
Error encountered in source line #    88

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    89

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #    89

Error # 12359
Undefined operand for transpose.
Error encountered in source line #    95

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CM1M2' is undefined
Error encountered in source line #    95

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #    96

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #    96

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #    98

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CSUM2M1' is undefined
Error encountered in source line #    98

Error # 12346
Undefined operand for unary operator.
Error encountered in source line #   100

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CSQRTL1' is undefined
Error encountered in source line #   100

Error # 12359
Undefined operand for transpose.
Error encountered in source line #   102

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CB' is undefined
Error encountered in source line #   102

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   103

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CA' is undefined
Error encountered in source line #   103

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'CC' is undefined
Error encountered in source line #   103

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   105

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CD' is undefined
Error encountered in source line #   105

Error # 12359
Undefined operand for transpose.
Error encountered in source line #   106

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   106

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   106

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #   112

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RM1M2' is undefined
Error encountered in source line #   112

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   113

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   113

Error # 12422
Undefined source operand for one of the RMAX, RMIN, RSSQ, RSUM.
Error encountered in source line #   115

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RSUM2M1' is undefined
Error encountered in source line #   115

Error # 12346
Undefined operand for unary operator.
Error encountered in source line #   117

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RSQRTL1' is undefined
Error encountered in source line #   117

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'RSQRTL1' is undefined
Error encountered in source line #   117

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #   119

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RB' is undefined
Error encountered in source line #   119

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   120

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RA' is undefined
Error encountered in source line #   120

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'RC' is undefined
Error encountered in source line #   120

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   122

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CA' is undefined
Error encountered in source line #   122

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   127

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CC' is undefined
Error encountered in source line #   127

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   128

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'TOP' is undefined
Error encountered in source line #   128

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #   129

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'BOT' is undefined
Error encountered in source line #   129

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #   130

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CTOP' is undefined
Error encountered in source line #   130

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'CBOT' is undefined
Error encountered in source line #   130

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   131

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   131

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   137

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   137

Error # 12332
Undefined variable in PRINT.

------ END MATRIX -----



matrix.
compute  loadings={
    -.73,    -.26,    .03,     .15,   -.01;
    -.43,    -.33,   -.08,    -.02,   -.60;
    -.79,    -.30,    .08,     .01,   -.11;
    -.65,    -.48,   -.09,   -.06,    -.05;
    -.78,    -.02,   -.02,   -.12,    -.25;
    -.73,    -.37,   -.01,   -.20,    -.12;
     .21,     .73,     .33,    .24,     .14;
     .15,     .81,     .13,   -.05,    -.02;
     .57,     .50,     .04,    .12,    -.34;
     .25 ,    .62,     .00,    .32,    -.35;
   -.11,     .48,      .48,    .28,    -.28;
     .39,     .67,     .23,    .15,     .06;
   -.19,    -.10,      .71,     -.20,   .01;
    .10,     .19,       .73,    -.02,   .12;
    -.21,    .05,      .68,    .27,    -.21;
     .26,    .22,      .50,    -.32,     .31;
    .15,     .29,      .72,     .00,    -.09;
    -.02,    .02,      .64,    .15,     .08;
     .49 ,   .55,     -.02,   -.07,     .23;
    .34,   -.11,      -.24,    .25,     .63;
    .19,     .39,      .33,    .49,     .41;
    .27 ,    .07,      .03,   -.08,     .81;
   -.25,   -.14,      .01,   -.00,     .67;
   -.15,    .28,      .24,    .65,     .18;
    .66,    .26,      .10,    .51,    -.06;
    .26,   -.07,     -.06 ,   .71,   -.11;
    .60,   .10,      -.04,    .60,     .11;
    .62,    .38,    -.06,     .53,   -.08;
    .65,    .17,    -.02,     .55,    .00;
   .75 ,   -.10,    -.06,    .17,    .11}.


compute   norms={
      .81,    .02,    -.01,     -.01 ,   -.10;
      .63,   -.03,     .01,     -.48,    -.08;
      .80,   -.10,     .02,     -.03,    -.26;
      .73,   -.18,    -.09,      .04,    -.16;
      .49,    .35,     .02 ,    -.21,    -.32;
      .70,   -.15,    -.09 ,     .04,    -.38;
     -.12,    .66,     .18,      .38,    .13;
     -.18,    .66,     .04,      .07,    -.03;
     -.32,    .44,     .23,     -.32,     .32;
      .04,    .54,     .16,     -.27,   .42;
      .00,    .58,     .11,     -.38,    -.06;
     -.04,   .74 ,     .19,      .10 ,   .10;
      .18,   .18 ,     .58,      -.14 ,  -.31;
      .14,    .04,      .73,      .17  ,  .14;
      .37,    .41,      .50,     -.01  ,  .12;
     -.19,    .22,      .57,      .04  ,  -.04;
     -.15,   -.01,      .75,     -.09 ,   .16;
     -.13,    .08,      .49,     -.07 ,   -.15;
     -.35,    .22,      .15,      .56 ,   .03;
     -.03,   -.15,     -.11,      .68,    .24;
     -.06,    .52,     -.05,      .55,    .27;
     -.16,   -.08,      .00,      .77,    .01;
      .19,   -.12,     -.18,      .59,    -.08;
      .04,    .27,      .13 ,     .62,    .00;
     -.41,    .17,      .13 ,     .03,    .64;
     -.04,    .06,     -.19,     .01 ,   .70;
     -.20,   -.04,      .01,     .29 ,   .68;
     -.09,    .23,      .15,    -.13 ,   .74;
     -.33,    .17,     -.08,     .06 ,   .75;
     -.23,   -.29,     -.04 ,   .22 ,   .57}.




compute  s=t(loadings)*norms.
compute  w1=s*t(s).
compute  v1=t(s)*s.
call eigen(w1,w,evalw1).
call eigen(v1,v,evalv1).
compute  o=t(w)*s*v.
compute  q1=o &/abs(o).
compute  k1=diag(q1).
compute  k=mdiag(k1).

compute  ww=w*k.
compute  t1=ww*t(v).
compute  procrust=loadings*t1.


comment  the following commands calculate congruence coefficients for the
         factor columns.

compute  cm1m2=t(procrust)*norms.
compute  ca=diag(cm1m2).
compute  csum2m1=cssq(procrust).
compute  csum2m2=cssq(norms).
compute  csqrtl1=sqrt(csum2m1).
compute  csqrtl2=sqrt(csum2m2).

compute  cb=t(csqrtl1)*csqrtl2.
compute  cc=diag(cb).

compute  cd=ca&/cc.
compute  faccongc=t(cd).


comment  the following commands calculate congruence coefficients for the
         factor rows.

compute  rm1m2=procrust*t(norms).
compute  ra=diag(rm1m2).
compute  rsum2m1=rssq(procrust).
compute  rsum2m2=rssq(norms).
compute  rsqrtl1=sqrt(rsum2m1).
compute  rsqrtl2=sqrt(rsum2m2).

compute  rb=rsqrtl1*t(rsqrtl2).
compute  rc=diag(rb).

compute  faccongr=ra&/rc.

comment  the following commands calculate the overall congruence coefficients
         for the data set.

compute  top={ca;ra}.
compute  bot={cc;rc}.
compute  ctop=csum(top).
compute  cbot=csum(bot).
compute  total=ctop/cbot.


comment  the following commands merge the above matrices into one overall
         matrix that will be printed out.

compute  procrust={procrust,faccongr;faccongc,total}.

print  procrust /title = "FACTOR CONGRUENCE COEFFICIENTS"/format f5.2
   /clabels= "NEURO"  "EXTRA"  "OPEN"  "AGREE" "CONSC" "ITEMCONG"
   /RLABELS= "N1" "N2" "N3" "N4" "N5" "N6" "E1" "E2" "E3" "E4" "E5"
             "E6" "O1" "O2" "O3" "O4" "O5" "O6" "A1" "A2" "A3" "A4"
             "A5" "A6" "C1" "C2" "C3" "C4" "C5" "C6" "FACTCONG"
   /space=newpage.
END MATRIX.


Martin F. Sherman, Ph.D.
Professor of Psychology
Director of  Masters Education in Psychology: Thesis Track

Loyola University Maryland
Department of Psychology
222 B Beatty Hall
4501 North Charles Street
Baltimore, MD 21210

410-617-2417
[hidden email]<mailto:[hidden email]>
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: matrix program runs on 22.0 but not on 21

David Marso
Administrator
Indeed, that is the line, but you need to format it to see where the 'real' 0 values are.
Note that the result of the &/ operation will be simply the signs of the elements.

Run MATRIX procedure:
 
O
   7.8238062186462510   -.0000000000000007   -.0000000000000018    .0000000000000000    .0000000000000009
    .0000000000000000  -3.7577669793284830   -.0000000000000020    .0000000000000003   -.0000000000000011
   -.0000000000000021    .0000000000000009  -2.4867730008316750   -.0000000000000014   -.0000000000000022
    .0000000000000022   -.0000000000000014    .0000000000000020  -1.6395375004377320   -.0000000000000007
    .0000000000000012   -.0000000000000016    .0000000000000007   -.0000000000000033   1.2102901342792870
 
------ END MATRIX -----
Bruce Weaver wrote
I have release 21.0.0.2 (64-bit) running under Windoze 7.  I tried running your code, and got a bunch of errors, one of them being a division by 0.   So I looked at your matrix program to see where the first division is happening.  I think it is this line:

compute  q1=o &/abs(o).

For those not familiar with it, &/ is the element-wise division operator.

Next, I inserted a PRINT command to display matrix "o" BEFORE that problematic COMPUTE line, and followed it with an END MATRIX.  Here's what o looks like before your matrix program hits that COMPUTE:

o-matrix
  7.82   .00   .00   .00   .00
   .00 -3.76   .00   .00   .00
   .00   .00 -2.49   .00   .00
   .00   .00   .00 -1.64   .00
   .00   .00   .00   .00  1.21

All of the off-diagonal cells are zeros.  So that's where your division by 0 is coming from, and I'll bet everything else that goes wrong springs from that.

HTH.


msherman wrote
Dear List: I have a matrix program (see bottom on email) that runs correctly when using spss22.0 but when running the program using spss21 I get the following error message(s). The first error message (see below) Error # 12581 A division by zero has been attempted. Execution of this command stops. It there is a zero somewhere then why does the program run without errors in spss22. Thanks,   martin

Martin F. Sherman, Ph.D.
Professor of Psychology
Director of  Masters Education in Psychology: Thesis Track

Loyola University Maryland
Department of Psychology
222 B Beatty Hall
4501 North Charles Street
Baltimore, MD 21210

410-617-2417
[hidden email]<mailto:[hidden email]>



Run MATRIX procedure:
Error encountered in source line #    82

Line 80  compute  ww=w*k.
Line 81   compute  t1=ww*t(v).
Line 82.  compute  procrust=loadings*t1.

Error # 12581
A division by zero has been attempted.
Execution of this command stops.
Error encountered in source line #    82

Error # 12581
A division by zero has been attempted.
Error encountered in source line #    83

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'Q1' is undefined
Error encountered in source line #    83

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #    84

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'K1' is undefined
Error encountered in source line #    84

Error # 12586
The argument of the MDIAG function is undefined.
Error encountered in source line #    85

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'K' is undefined
Error encountered in source line #    85

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'K' is undefined
Error encountered in source line #    85

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    87

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'WW' is undefined
Error encountered in source line #    87

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'WW' is undefined
Error encountered in source line #    87

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    88

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'T1' is undefined
Error encountered in source line #    88

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'T1' is undefined
Error encountered in source line #    88

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    89

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #    89

Error # 12359
Undefined operand for transpose.
Error encountered in source line #    95

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CM1M2' is undefined
Error encountered in source line #    95

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #    96

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #    96

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #    98

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CSUM2M1' is undefined
Error encountered in source line #    98

Error # 12346
Undefined operand for unary operator.
Error encountered in source line #   100

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CSQRTL1' is undefined
Error encountered in source line #   100

Error # 12359
Undefined operand for transpose.
Error encountered in source line #   102

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CB' is undefined
Error encountered in source line #   102

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   103

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CA' is undefined
Error encountered in source line #   103

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'CC' is undefined
Error encountered in source line #   103

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   105

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CD' is undefined
Error encountered in source line #   105

Error # 12359
Undefined operand for transpose.
Error encountered in source line #   106

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   106

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   106

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #   112

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RM1M2' is undefined
Error encountered in source line #   112

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   113

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   113

Error # 12422
Undefined source operand for one of the RMAX, RMIN, RSSQ, RSUM.
Error encountered in source line #   115

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RSUM2M1' is undefined
Error encountered in source line #   115

Error # 12346
Undefined operand for unary operator.
Error encountered in source line #   117

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RSQRTL1' is undefined
Error encountered in source line #   117

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'RSQRTL1' is undefined
Error encountered in source line #   117

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #   119

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RB' is undefined
Error encountered in source line #   119

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   120

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RA' is undefined
Error encountered in source line #   120

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'RC' is undefined
Error encountered in source line #   120

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   122

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CA' is undefined
Error encountered in source line #   122

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   127

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CC' is undefined
Error encountered in source line #   127

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   128

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'TOP' is undefined
Error encountered in source line #   128

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #   129

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'BOT' is undefined
Error encountered in source line #   129

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #   130

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CTOP' is undefined
Error encountered in source line #   130

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'CBOT' is undefined
Error encountered in source line #   130

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   131

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   131

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   137

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   137

Error # 12332
Undefined variable in PRINT.

------ END MATRIX -----



matrix.
compute  loadings={
    -.73,    -.26,    .03,     .15,   -.01;
    -.43,    -.33,   -.08,    -.02,   -.60;
    -.79,    -.30,    .08,     .01,   -.11;
    -.65,    -.48,   -.09,   -.06,    -.05;
    -.78,    -.02,   -.02,   -.12,    -.25;
    -.73,    -.37,   -.01,   -.20,    -.12;
     .21,     .73,     .33,    .24,     .14;
     .15,     .81,     .13,   -.05,    -.02;
     .57,     .50,     .04,    .12,    -.34;
     .25 ,    .62,     .00,    .32,    -.35;
   -.11,     .48,      .48,    .28,    -.28;
     .39,     .67,     .23,    .15,     .06;
   -.19,    -.10,      .71,     -.20,   .01;
    .10,     .19,       .73,    -.02,   .12;
    -.21,    .05,      .68,    .27,    -.21;
     .26,    .22,      .50,    -.32,     .31;
    .15,     .29,      .72,     .00,    -.09;
    -.02,    .02,      .64,    .15,     .08;
     .49 ,   .55,     -.02,   -.07,     .23;
    .34,   -.11,      -.24,    .25,     .63;
    .19,     .39,      .33,    .49,     .41;
    .27 ,    .07,      .03,   -.08,     .81;
   -.25,   -.14,      .01,   -.00,     .67;
   -.15,    .28,      .24,    .65,     .18;
    .66,    .26,      .10,    .51,    -.06;
    .26,   -.07,     -.06 ,   .71,   -.11;
    .60,   .10,      -.04,    .60,     .11;
    .62,    .38,    -.06,     .53,   -.08;
    .65,    .17,    -.02,     .55,    .00;
   .75 ,   -.10,    -.06,    .17,    .11}.


compute   norms={
      .81,    .02,    -.01,     -.01 ,   -.10;
      .63,   -.03,     .01,     -.48,    -.08;
      .80,   -.10,     .02,     -.03,    -.26;
      .73,   -.18,    -.09,      .04,    -.16;
      .49,    .35,     .02 ,    -.21,    -.32;
      .70,   -.15,    -.09 ,     .04,    -.38;
     -.12,    .66,     .18,      .38,    .13;
     -.18,    .66,     .04,      .07,    -.03;
     -.32,    .44,     .23,     -.32,     .32;
      .04,    .54,     .16,     -.27,   .42;
      .00,    .58,     .11,     -.38,    -.06;
     -.04,   .74 ,     .19,      .10 ,   .10;
      .18,   .18 ,     .58,      -.14 ,  -.31;
      .14,    .04,      .73,      .17  ,  .14;
      .37,    .41,      .50,     -.01  ,  .12;
     -.19,    .22,      .57,      .04  ,  -.04;
     -.15,   -.01,      .75,     -.09 ,   .16;
     -.13,    .08,      .49,     -.07 ,   -.15;
     -.35,    .22,      .15,      .56 ,   .03;
     -.03,   -.15,     -.11,      .68,    .24;
     -.06,    .52,     -.05,      .55,    .27;
     -.16,   -.08,      .00,      .77,    .01;
      .19,   -.12,     -.18,      .59,    -.08;
      .04,    .27,      .13 ,     .62,    .00;
     -.41,    .17,      .13 ,     .03,    .64;
     -.04,    .06,     -.19,     .01 ,   .70;
     -.20,   -.04,      .01,     .29 ,   .68;
     -.09,    .23,      .15,    -.13 ,   .74;
     -.33,    .17,     -.08,     .06 ,   .75;
     -.23,   -.29,     -.04 ,   .22 ,   .57}.




compute  s=t(loadings)*norms.
compute  w1=s*t(s).
compute  v1=t(s)*s.
call eigen(w1,w,evalw1).
call eigen(v1,v,evalv1).
compute  o=t(w)*s*v.
compute  q1=o &/abs(o).
compute  k1=diag(q1).
compute  k=mdiag(k1).

compute  ww=w*k.
compute  t1=ww*t(v).
compute  procrust=loadings*t1.


comment  the following commands calculate congruence coefficients for the
         factor columns.

compute  cm1m2=t(procrust)*norms.
compute  ca=diag(cm1m2).
compute  csum2m1=cssq(procrust).
compute  csum2m2=cssq(norms).
compute  csqrtl1=sqrt(csum2m1).
compute  csqrtl2=sqrt(csum2m2).

compute  cb=t(csqrtl1)*csqrtl2.
compute  cc=diag(cb).

compute  cd=ca&/cc.
compute  faccongc=t(cd).


comment  the following commands calculate congruence coefficients for the
         factor rows.

compute  rm1m2=procrust*t(norms).
compute  ra=diag(rm1m2).
compute  rsum2m1=rssq(procrust).
compute  rsum2m2=rssq(norms).
compute  rsqrtl1=sqrt(rsum2m1).
compute  rsqrtl2=sqrt(rsum2m2).

compute  rb=rsqrtl1*t(rsqrtl2).
compute  rc=diag(rb).

compute  faccongr=ra&/rc.

comment  the following commands calculate the overall congruence coefficients
         for the data set.

compute  top={ca;ra}.
compute  bot={cc;rc}.
compute  ctop=csum(top).
compute  cbot=csum(bot).
compute  total=ctop/cbot.


comment  the following commands merge the above matrices into one overall
         matrix that will be printed out.

compute  procrust={procrust,faccongr;faccongc,total}.

print  procrust /title = "FACTOR CONGRUENCE COEFFICIENTS"/format f5.2
   /clabels= "NEURO"  "EXTRA"  "OPEN"  "AGREE" "CONSC" "ITEMCONG"
   /RLABELS= "N1" "N2" "N3" "N4" "N5" "N6" "E1" "E2" "E3" "E4" "E5"
             "E6" "O1" "O2" "O3" "O4" "O5" "O6" "A1" "A2" "A3" "A4"
             "A5" "A6" "C1" "C2" "C3" "C4" "C5" "C6" "FACTCONG"
   /space=newpage.
END MATRIX.


Martin F. Sherman, Ph.D.
Professor of Psychology
Director of  Masters Education in Psychology: Thesis Track

Loyola University Maryland
Department of Psychology
222 B Beatty Hall
4501 North Charles Street
Baltimore, MD 21210

410-617-2417
[hidden email]<mailto:[hidden email]>
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: matrix program runs on 22.0 but not on 21

David Marso
Administrator
Furthermore, examining the remainder of the code reveals that ONLY the DIAGonal of the resulting q1 matrix is used in any subsequent calculations.  Hence, this full matrix calculation is questionable out of the gate.
A pithy saying comes to mind:  
"If you think it's expensive to hire a professional, wait until you hire an amateur"

David Marso wrote
Indeed, that is the line, but you need to format it to see where the 'real' 0 values are.
Note that the result of the &/ operation will be simply the signs of the elements.

Run MATRIX procedure:
 
O
   7.8238062186462510   -.0000000000000007   -.0000000000000018    .0000000000000000    .0000000000000009
    .0000000000000000  -3.7577669793284830   -.0000000000000020    .0000000000000003   -.0000000000000011
   -.0000000000000021    .0000000000000009  -2.4867730008316750   -.0000000000000014   -.0000000000000022
    .0000000000000022   -.0000000000000014    .0000000000000020  -1.6395375004377320   -.0000000000000007
    .0000000000000012   -.0000000000000016    .0000000000000007   -.0000000000000033   1.2102901342792870
 
------ END MATRIX -----
Bruce Weaver wrote
I have release 21.0.0.2 (64-bit) running under Windoze 7.  I tried running your code, and got a bunch of errors, one of them being a division by 0.   So I looked at your matrix program to see where the first division is happening.  I think it is this line:

compute  q1=o &/abs(o).

For those not familiar with it, &/ is the element-wise division operator.

Next, I inserted a PRINT command to display matrix "o" BEFORE that problematic COMPUTE line, and followed it with an END MATRIX.  Here's what o looks like before your matrix program hits that COMPUTE:

o-matrix
  7.82   .00   .00   .00   .00
   .00 -3.76   .00   .00   .00
   .00   .00 -2.49   .00   .00
   .00   .00   .00 -1.64   .00
   .00   .00   .00   .00  1.21

All of the off-diagonal cells are zeros.  So that's where your division by 0 is coming from, and I'll bet everything else that goes wrong springs from that.

HTH.


msherman wrote
Dear List: I have a matrix program (see bottom on email) that runs correctly when using spss22.0 but when running the program using spss21 I get the following error message(s). The first error message (see below) Error # 12581 A division by zero has been attempted. Execution of this command stops. It there is a zero somewhere then why does the program run without errors in spss22. Thanks,   martin

Martin F. Sherman, Ph.D.
Professor of Psychology
Director of  Masters Education in Psychology: Thesis Track

Loyola University Maryland
Department of Psychology
222 B Beatty Hall
4501 North Charles Street
Baltimore, MD 21210

410-617-2417
[hidden email]<mailto:[hidden email]>



Run MATRIX procedure:
Error encountered in source line #    82

Line 80  compute  ww=w*k.
Line 81   compute  t1=ww*t(v).
Line 82.  compute  procrust=loadings*t1.

Error # 12581
A division by zero has been attempted.
Execution of this command stops.
Error encountered in source line #    82

Error # 12581
A division by zero has been attempted.
Error encountered in source line #    83

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'Q1' is undefined
Error encountered in source line #    83

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #    84

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'K1' is undefined
Error encountered in source line #    84

Error # 12586
The argument of the MDIAG function is undefined.
Error encountered in source line #    85

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'K' is undefined
Error encountered in source line #    85

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'K' is undefined
Error encountered in source line #    85

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    87

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'WW' is undefined
Error encountered in source line #    87

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'WW' is undefined
Error encountered in source line #    87

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    88

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'T1' is undefined
Error encountered in source line #    88

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'T1' is undefined
Error encountered in source line #    88

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #    89

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #    89

Error # 12359
Undefined operand for transpose.
Error encountered in source line #    95

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CM1M2' is undefined
Error encountered in source line #    95

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #    96

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #    96

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #    98

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CSUM2M1' is undefined
Error encountered in source line #    98

Error # 12346
Undefined operand for unary operator.
Error encountered in source line #   100

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CSQRTL1' is undefined
Error encountered in source line #   100

Error # 12359
Undefined operand for transpose.
Error encountered in source line #   102

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CB' is undefined
Error encountered in source line #   102

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   103

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CA' is undefined
Error encountered in source line #   103

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'CC' is undefined
Error encountered in source line #   103

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   105

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CD' is undefined
Error encountered in source line #   105

Error # 12359
Undefined operand for transpose.
Error encountered in source line #   106

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   106

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   106

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #   112

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RM1M2' is undefined
Error encountered in source line #   112

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   113

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   113

Error # 12422
Undefined source operand for one of the RMAX, RMIN, RSSQ, RSUM.
Error encountered in source line #   115

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RSUM2M1' is undefined
Error encountered in source line #   115

Error # 12346
Undefined operand for unary operator.
Error encountered in source line #   117

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RSQRTL1' is undefined
Error encountered in source line #   117

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'RSQRTL1' is undefined
Error encountered in source line #   117

Error # 12343
Undefined operand in matrix multiply.
Error encountered in source line #   119

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RB' is undefined
Error encountered in source line #   119

Error # 12366
Undefined operand in DIAG.
Error encountered in source line #   120

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'RA' is undefined
Error encountered in source line #   120

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'RC' is undefined
Error encountered in source line #   120

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   122

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CA' is undefined
Error encountered in source line #   122

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   127

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CC' is undefined
Error encountered in source line #   127

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   128

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'TOP' is undefined
Error encountered in source line #   128

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #   129

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'BOT' is undefined
Error encountered in source line #   129

Error # 12396
Undefined source operand in one of the CMAX, CMIN, CSSQ, CSUM.
Error encountered in source line #   130

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'CTOP' is undefined
Error encountered in source line #   130

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Matrix - 'CBOT' is undefined
Error encountered in source line #   130

Error # 12347
Undefined operand for binary operator.
Error encountered in source line #   131

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   131

Error # 12363
Undefined operand in the expression inside brackets.
Error encountered in source line #   137

Error # 12492
An attempt has been made to use previously undefined matrix (or scalar).
Execution of this command stops.
Matrix - 'PROCRUST' is undefined
Error encountered in source line #   137

Error # 12332
Undefined variable in PRINT.

------ END MATRIX -----



matrix.
compute  loadings={
    -.73,    -.26,    .03,     .15,   -.01;
    -.43,    -.33,   -.08,    -.02,   -.60;
    -.79,    -.30,    .08,     .01,   -.11;
    -.65,    -.48,   -.09,   -.06,    -.05;
    -.78,    -.02,   -.02,   -.12,    -.25;
    -.73,    -.37,   -.01,   -.20,    -.12;
     .21,     .73,     .33,    .24,     .14;
     .15,     .81,     .13,   -.05,    -.02;
     .57,     .50,     .04,    .12,    -.34;
     .25 ,    .62,     .00,    .32,    -.35;
   -.11,     .48,      .48,    .28,    -.28;
     .39,     .67,     .23,    .15,     .06;
   -.19,    -.10,      .71,     -.20,   .01;
    .10,     .19,       .73,    -.02,   .12;
    -.21,    .05,      .68,    .27,    -.21;
     .26,    .22,      .50,    -.32,     .31;
    .15,     .29,      .72,     .00,    -.09;
    -.02,    .02,      .64,    .15,     .08;
     .49 ,   .55,     -.02,   -.07,     .23;
    .34,   -.11,      -.24,    .25,     .63;
    .19,     .39,      .33,    .49,     .41;
    .27 ,    .07,      .03,   -.08,     .81;
   -.25,   -.14,      .01,   -.00,     .67;
   -.15,    .28,      .24,    .65,     .18;
    .66,    .26,      .10,    .51,    -.06;
    .26,   -.07,     -.06 ,   .71,   -.11;
    .60,   .10,      -.04,    .60,     .11;
    .62,    .38,    -.06,     .53,   -.08;
    .65,    .17,    -.02,     .55,    .00;
   .75 ,   -.10,    -.06,    .17,    .11}.


compute   norms={
      .81,    .02,    -.01,     -.01 ,   -.10;
      .63,   -.03,     .01,     -.48,    -.08;
      .80,   -.10,     .02,     -.03,    -.26;
      .73,   -.18,    -.09,      .04,    -.16;
      .49,    .35,     .02 ,    -.21,    -.32;
      .70,   -.15,    -.09 ,     .04,    -.38;
     -.12,    .66,     .18,      .38,    .13;
     -.18,    .66,     .04,      .07,    -.03;
     -.32,    .44,     .23,     -.32,     .32;
      .04,    .54,     .16,     -.27,   .42;
      .00,    .58,     .11,     -.38,    -.06;
     -.04,   .74 ,     .19,      .10 ,   .10;
      .18,   .18 ,     .58,      -.14 ,  -.31;
      .14,    .04,      .73,      .17  ,  .14;
      .37,    .41,      .50,     -.01  ,  .12;
     -.19,    .22,      .57,      .04  ,  -.04;
     -.15,   -.01,      .75,     -.09 ,   .16;
     -.13,    .08,      .49,     -.07 ,   -.15;
     -.35,    .22,      .15,      .56 ,   .03;
     -.03,   -.15,     -.11,      .68,    .24;
     -.06,    .52,     -.05,      .55,    .27;
     -.16,   -.08,      .00,      .77,    .01;
      .19,   -.12,     -.18,      .59,    -.08;
      .04,    .27,      .13 ,     .62,    .00;
     -.41,    .17,      .13 ,     .03,    .64;
     -.04,    .06,     -.19,     .01 ,   .70;
     -.20,   -.04,      .01,     .29 ,   .68;
     -.09,    .23,      .15,    -.13 ,   .74;
     -.33,    .17,     -.08,     .06 ,   .75;
     -.23,   -.29,     -.04 ,   .22 ,   .57}.




compute  s=t(loadings)*norms.
compute  w1=s*t(s).
compute  v1=t(s)*s.
call eigen(w1,w,evalw1).
call eigen(v1,v,evalv1).
compute  o=t(w)*s*v.
compute  q1=o &/abs(o).
compute  k1=diag(q1).
compute  k=mdiag(k1).

compute  ww=w*k.
compute  t1=ww*t(v).
compute  procrust=loadings*t1.


comment  the following commands calculate congruence coefficients for the
         factor columns.

compute  cm1m2=t(procrust)*norms.
compute  ca=diag(cm1m2).
compute  csum2m1=cssq(procrust).
compute  csum2m2=cssq(norms).
compute  csqrtl1=sqrt(csum2m1).
compute  csqrtl2=sqrt(csum2m2).

compute  cb=t(csqrtl1)*csqrtl2.
compute  cc=diag(cb).

compute  cd=ca&/cc.
compute  faccongc=t(cd).


comment  the following commands calculate congruence coefficients for the
         factor rows.

compute  rm1m2=procrust*t(norms).
compute  ra=diag(rm1m2).
compute  rsum2m1=rssq(procrust).
compute  rsum2m2=rssq(norms).
compute  rsqrtl1=sqrt(rsum2m1).
compute  rsqrtl2=sqrt(rsum2m2).

compute  rb=rsqrtl1*t(rsqrtl2).
compute  rc=diag(rb).

compute  faccongr=ra&/rc.

comment  the following commands calculate the overall congruence coefficients
         for the data set.

compute  top={ca;ra}.
compute  bot={cc;rc}.
compute  ctop=csum(top).
compute  cbot=csum(bot).
compute  total=ctop/cbot.


comment  the following commands merge the above matrices into one overall
         matrix that will be printed out.

compute  procrust={procrust,faccongr;faccongc,total}.

print  procrust /title = "FACTOR CONGRUENCE COEFFICIENTS"/format f5.2
   /clabels= "NEURO"  "EXTRA"  "OPEN"  "AGREE" "CONSC" "ITEMCONG"
   /RLABELS= "N1" "N2" "N3" "N4" "N5" "N6" "E1" "E2" "E3" "E4" "E5"
             "E6" "O1" "O2" "O3" "O4" "O5" "O6" "A1" "A2" "A3" "A4"
             "A5" "A6" "C1" "C2" "C3" "C4" "C5" "C6" "FACTCONG"
   /space=newpage.
END MATRIX.


Martin F. Sherman, Ph.D.
Professor of Psychology
Director of  Masters Education in Psychology: Thesis Track

Loyola University Maryland
Department of Psychology
222 B Beatty Hall
4501 North Charles Street
Baltimore, MD 21210

410-617-2417
[hidden email]<mailto:[hidden email]>
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: matrix program runs on 22.0 but not on 21

David Marso
Administrator
This post was updated on .
Odd, Booted my 32 bit box running 22.0.0.1 and the program ran.
Formatting o to 18 decimal places yields the top matrix.
This failed in 22.0.0.1 (64 bit with 0 divide error).
Failed in 21.?.? with same error (see Bruce W's post).
--
Run MATRIX procedure:
 
O
 7.823806218646248000  .000000000000001293  .000000000000000238 -.000000000000000805 -.000000000000000157
 -.000000000000000875 -3.75776697932848600  .000000000000000952 -.000000000000000096  .000000000000000831
  .000000000000000278 -.000000000000000498 -2.48677300083167300 -.000000000000000765 -.000000000000001489
 -.000000000000000136 -.000000000000000050  .000000000000000432 -1.63953750043773100  .000000000000000295
 -.000000000000000466  .000000000000001078 -.000000000000001309  .000000000000000764 1.210290134279286000
 
 
 
FACTOR CONGRUENCE COEFFICIENTS
            NEURO    EXTRA     OPEN    AGREE    CONSC ITEMCONG
N1            .75     -.04     -.09      .02     -.24      .97
N2            .50     -.15     -.11     -.61     -.10      .95
N3            .76     -.08     -.03     -.11     -.36      .99
N4            .65     -.32     -.16     -.09     -.33      .94
N5            .60      .15     -.13     -.26     -.47      .93
N6            .63     -.22     -.08     -.17     -.49      .95
E1           -.28      .71      .28      .25      .19      .96
E2           -.40      .72      .11      .03     -.06      .97
E3           -.53      .42      .10     -.28      .40      .95
E4           -.24      .65     -.02     -.23      .38      .90
E5            .15      .63      .40     -.15      .15      .82
E6           -.45      .59      .23      .14      .24      .84
O1            .21     -.02      .69      .00     -.27      .94
O2           -.05      .22      .72      .16     -.02      .92
O3            .40      .27      .60     -.10      .13      .97
O4           -.38      .09      .55      .27     -.21      .87
O5           -.10      .34      .71     -.03      .05      .89
O6            .17      .13      .60      .15      .09      .73
A1           -.64      .35      .03      .23      .10      .80
A2           -.22     -.23     -.21      .64      .29      .95
A3           -.06      .43      .27      .55      .38      .91
A4           -.36     -.12      .06      .77     -.07      .97
A5            .18     -.16     -.04      .65     -.23      .95
A6            .34      .46      .12      .36      .38      .69
C1           -.37      .24      .14      .07      .75      .99
C2            .14      .06     -.08      .04      .75      .96
C3           -.26      .09     -.01      .24      .78      .98
C4           -.39      .35     -.03      .05      .73      .89
C5           -.33      .15      .02      .12      .78      .99
C6           -.51     -.24      .05      .12      .53      .92
FACTCONG      .89      .94      .92      .92      .95      .92
 
------ END MATRIX -----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"