Path-Matrix.txt Here is an annotated copy of Minitab output that illustrates how to use Matrix algebra to obtain the effect coefficients and indirect effects for a path analysis. This analysis uses the path model for revised Figure 1 from Wuensch's handouts on path analysis. MTB > read 3 3 m1 3 ROWS READ I entered the 3 x 3 identity matrix as M1. This identity matrix must have as many rows (and columns) as there are endogenous variables in the model. In revised Figure 1 we treat only SES as exogenous, IQ, nAch, and GPA as endogenous. MTB > print m1 MATRIX M1 1 0 0 0 1 0 I 0 0 1 MTB > read 3 3 m2 3 ROWS READ I entered the 3 x 3 matrix of path coefficients among endogenous variables, Dyy. MTB > print m2 MATRIX M2 IQ nAch GPA 0.00000000 0.00000000 0.00000000 IQ 0.04100000 0.00000000 0.00000000 nAch Dyy 0.50099999 0.41599995 0.00000000 GPA MTB > subtract m2 from m1 put into m3 I subtracted Dyy from the identity matrix to obtain B MTB > print m3 MATRIX M3 1.00000 0.00000 0.00000 -0.04100 1.00000 0.00000 B -0.50100 -0.41600 1.00000 MTB > invert m3 m4 I inverted matrix B MTB > print m4 MATRIX M4 1.0000000 0.0000000 0.0000000 0.0410000 1.0000000 0.0000000 B ** -1 0.5180560 0.4159999 1.0000000 MTB > mult -1 m4 m5 I multiplied the inverted B matrix by minus 1. MTB > print m5 MATRIX M5 -1.00000 0.00000 0.00000 -0.04100 -1.00000 0.00000 -B ** -1 -0.51806 -0.41600 -1.00000 MTB > read 3 1 m6 I entered the matrix of path coefficients between exogenous and endogenous variables into M6 after multiplying (in my head) by minus one. 3 ROWS READ MTB > print m6 MATRIX M6 SES -0.300000 IQ -0.398000 nAch C = -1 * Dyx -0.009000 GPA MTB > mult m5 m6 m7 I multiplied -B ** -1 by C to obtain the effect coefficients for the exogenous to endogenous variables. MTB > print m7 MATRIX M7 SES 0.300000 IQ 0.410300 nAch Eyx 0.329985 GPA MTB > add m7 m6 m8 I added C to Eyx to obtain the indirect effects. Remember that C = -Dyx so this is the same as subtracting Dyx (the direct effects) from Eyx. MTB > print m8 MATRIX M8 SES 0.000000 IQ 0.012300 nAch Iyx 0.320985 GPA MTB > subtract m1 from m4 put into m9 I subtracted the identity matrix from B ** -1 to obtain the matrix of effect coefficients for endogenous variables on endogenous variables. MTB > print m9 MATRIX M9 IQ nAch GPA 0.00000000 0.00000000 0.00000000 IQ 0.04100000 0.00000000 0.00000000 nAch Eyy 0.51805598 0.41599995 0.00000000 GPA MTB > subtract m2 from m9 put into m10 I subtracted Dyy, the direct effects, from Eyy to obtain the indirect effects. MTB > print m10 MATRIX M10 IQ nAch GPA 0.000000000 0.000000000 0.000000000 IQ 0.000000000 0.000000000 0.000000000 nAch Iyy 0.017055988 0.000000000 0.000000000 GPA Please verify that the coefficients obtained here by matrix methods are identical to those that we obtained by hand solution earlier. ***************************************************************** Here is the matrix solution for effect coefficients for the path analysis in Figure 1 of Wuensch's handouts with SES and IQ exogenous. MTB > read 2 2 m1 2 ROWS READ MTB > print m1 MATRIX M1 1 0 identity matrix 0 1 MTB > read 2 2 m2 2 ROWS READ MTB > print m2 MATRIX M2 this is Dyy nAch GPA 0.0000000 0.0000000 nAch 0.4159999 0.0000000 GPA MTB > subtract m2 from m1 put into m3 MTB > print m3 MATRIX M3 this is B 1.00000 0.00000 -0.41600 1.00000 MTB > invert m3 m4 MTB > print m4 MATRIX M4 This is B ** -1 1.0000000 0.0000000 0.4159999 1.0000000 MTB > mult -1 m4 m5 MTB > print m5 MATRIX M5 This is -1 * B ** -1 -1.00000 0.00000 -0.41600 -1.00000 MTB > read 2 2 m6 2 ROWS READ MTB > print m6 This is C, that is, -Dyx MATRIX M6 SES IQ -0.398000 -0.041000 nAch -0.009000 -0.501000 GPA MTB > mult m5 m6 m7 MTB > print m7 This is Eyx MATRIX M7 SES IQ 0.398000 0.041000 nAch 0.174568 0.518056 GPA MTB > add m7 m6 m8 MTB > print m8 MATRIX M8 This is Iyx SES IQ 0.00000000 0.00000000 nAch 0.16556793 0.01705599 GPA MTB > subt m1 m4 m9 MTB > print m9 MATRIX M9 This is Eyy nAch GPA 0.0000000 0.0000000 nAch 0.4159999 0.0000000 GPA MTB > subt m2 m9 m10 MTB > print m10 MATRIX M10 This is Iyy 0 0 There are no indirect effects among endogenous variables. 0 0 ************************************************************* Matrix solution of effect coefficients for the overdetermined path model presented in Figure 6 of Wuensch's handouts on path analysis. MTB > read 2 2 m1 2 ROWS READ MTB > print m1 MATRIX M1 identity matrix 1 0 0 1 MTB > read 2 2 m2 2 ROWS READ MTB > print m2 MATRIX M2 Dyy nAch GPA 0.00 0.00 nAch 0.42 0.00 GPA MTB > subt m2 m1 m3 MTB > print m3 MATRIX M3 B 1.00 0.00 -0.42 1.00 MTB > invert m3 m4 MTB > print m4 MATRIX M4 B ** -1 1.00 0.00 0.42 1.00 MTB > mult -1 m4 m5 MTB > print m5 MATRIX M5 -1 * B ** -1 -1.00 0.00 -0.42 -1.00 MTB > read 2 2 m6 2 ROWS READ MTB > print m6 MATRIX M6 C = -Dyx SES IQ Note that we hypothesize no direct -0.410000 0.000000 nAch effect of SES on GPA or IQ on nAch 0.000000 -0.503000 GPA MTB > mult m5 m6 m7 MTB > print m7 Eyx MATRIX M7 SES IQ 0.40999997 0.00000000 nAch 0.17219996 0.50299996 GPA MTB > add m7 m6 m8 MTB > print m8 MATRIX M8 Iyx SES IQ 0.00000000 0.00000000 nAch 0.17219996 0.00000000 GPA MTB > subt m1 m4 m9 MTB > print m9 Eyy MATRIX M9 nAch GPA 0.00 0.00 nAch 0.42 0.00 GPA MTB > subt m2 m9 m10 MTB > print m10 Iyy MATRIX M10 0 0 no indirect effects 0 0 ********************************************************** Matrix solution for effect coefficients for the model presented in Figure 7 of Wuensch's handouts on path analysis. MTB > read 3 3 m1 3 ROWS READ MTB > print m1 MATRIX M1 Identity matrix 1 0 0 0 1 0 0 0 1 MTB > read 3 3 m2 3 ROWS READ MTB > print m2 MATRIX M2 Direct Effects (Path Coefficients) EDUCATION OCCUPATION INCOME 0.00000000 0.00000000 0.00000000 EDUCATION 0.56680000 0.00000000 0.00000000 OCCUPATION Dyy 0.11929995 0.32470000 0.00000000 INCOME MTB > subtract m2 m1 m3 MTB > print m3 MATRIX M3 B 1.00000 0.00000 0.00000 -0.56680 1.00000 0.00000 -0.11930 -0.32470 1.00000 MTB > invert m3 m4 MTB > print m4 MATRIX M4 B ** -1 1.0000000 0.0000000 0.0000000 0.5668000 1.0000000 0.0000000 0.3033399 0.3247000 1.0000000 MTB > mult -1 m4 m5 MTB > print m5 MATRIX M5 -B ** -1 -1.00000 0.00000 0.00000 -0.56680 -1.00000 0.00000 -0.30334 -0.32470 -1.00000 MTB > read 3 3 m6 3 ROWS READ MTB > print m6 MATRIX M6 Direct Effects (Path Coefficients) Multiplied By Minus One FATHER'S ------------------- EDUCATION OCCUPAT'N # SIBS -0.198500 -0.278100 0.205300 EDUCATION -0.007400 -0.126700 0.054000 OCCUPATION C = -Dyx -0.049400 -0.049200 0.020000 INCOME MTB > mult m5 m6 m7 MTB > print m7 MATRIX M7 Total Effect Coefficients FATHER'S ------------------- EDUCATION OCCUPAT'N # SIBS 0.198500 0.278100 -0.205300 EDUCATION 0.119910 0.284327 -0.170364 OCCUPATION Eyx 0.112016 0.174698 -0.099809 INCOME MTB > add m7 m6 m8 MTB > print m8 MATRIX M8 Indirect Effects FATHER'S ------------------- EDUCATION OCCUPAT'N # SIBS 0.000000 0.000000 0.000000 EDUCATION 0.112510 0.157627 -0.116364 OCCUPATION Iyx 0.062616 0.125498 -0.079809 INCOME MTB > subt m1 m4 m9 MTB > print m9 MATRIX M9 Total Effect Coefficients EDUCATION OCCUPAT'N INCOME 0.0000000 0.0000000 0.0000000 EDUCATION 0.5668000 0.0000000 0.0000000 OCCUPATION Eyy 0.3033399 0.3247000 0.0000000 INCOME MTB > subt m2 m9 m10 MTB > print m10 MATRIX M10 Indirect Effects EDUCATION OCCUPAT'N INCOME 0.00000000 0.00000000 0.00000000 EDUCATION 0.00000000 0.00000000 0.00000000 OCCUPATION Iyy 0.18403995 0.00000000 0.00000000 INCOME