* remove all cases with missing values before running this. * make sure that the filter index is filter_$. if you run more than once delete filterab. GET FILE='C:\good.sav'. volume filter_$ zwater80 to zpeop81. set mxloop 9999. Define volume(!POSITIONAL !TOKENS(1) /!POSITIONAL !CMDEND). SORT CASES BY !1 . AUTORECODE VARIABLES=!1 /INTO filterab. compute filterab = filterab -1. Matrix. get bigx /varaibles = !2 / missing = omit. get ind /varaibles = filterab / missing = omit. compute nr = nrow(bigx). compute j = make(nr,1,1). compute n1e = t(j)*ind. compute n1p = nr-n1e. compute nc =ncol(bigx). * print bigx. print n1e. print n1p. print nr. compute xe = make(n1e,nc,0). compute xp = make(n1p,nc,0). loop i = 1 to n1e. loop j = 1 to nc. compute xe(i,j) = bigx(i+n1p, j). end loop. end loop. loop i = 1 to n1p. loop j = 1 to nc. compute xp(i,j) = bigx(i,j). end loop. end loop. compute d1 = det(T(xe)*xe/n1e). compute d2 = det(T(xp)*xp/n1p). compute vol = (d1/d2)**(1/(nc+1)). print vol. end matrix. !enddefine.