proc iml; X = { 1 0 0, 1 1 0, 1 1 1, 1 1 0, 1 0 0 }; P=x*inv(x`*x)*X`; print P[format = 5.3]; A = {4 0 2 1, 0 4 1 0, 2 1 6 2, 1 0 2 2}; V = shape(0,8,2); do L = 1 to 8; V[L,1]=L; V[L,2]= det(A - L*I(4)); ** I(4) = identity; end; create data1 from V [colname={L FL} ]; ** note {} matrices [] options or elements () functions; append from V; ** read V into dataset; proc glm; model PL= L L*L L*L*L L*L*L*L L*L*L*L*L; run;