Login  Register

Re: errors in DeCarlo's macro for multivariate normality

Posted by Andy W on Nov 12, 2014; 7:49pm
URL: http://spssx-discussion.165.s1.nabble.com/errors-in-DeCarlo-s-macro-for-multivariate-normality-tp5727898p5727905.html

That is one problem, and simply changing the below lines should fix that. From:

save mahal /outfile=temp
 /variables=case,rnk,top,dsq,pvar,ddf,ncase,a01,a05.
end matrix.
get file=temp.

with

save mahal /outfile=*
 /variables=case,rnk,top,dsq,pvar,ddf,ncase,a01,a05.
end matrix.
dataset name temp.
dataset activate temp.

Should do the trick.

Also the comments in the file are of the BATCH style, so if you used INSERT with the default SYNTAX=INTERACTIVE (instead of INCLUDE) the commenting causes problems. Ditto if you just copy-paste and run interactively.

Also one of the lines "do if p>1" looked like an error omitting the terminating period - although the results would be pretty innocuous, it just prevents some tables from being printed.

Here I've posted a version with these slight fixes and an example use at the end that runs as expected. https://dl.dropboxusercontent.com/u/3385251/Mult_Macro_fixAndy.sps
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/