/*********** cauchy.gau ******************************* Author: H. D. Vinod, Econ Dept, Fordham Univ., Bronx, NY Director: Fordham Institute for Ethics and Economic Policy E-mail: vinod AT fordham.edu Web page www.fordham.edu/economics/vinod Date: July 12, 1996 Create cauchy distributed random variables standardized to have zero mean and unit variance, numerically even though it really does not have mean or variance. INPUT: n=no of observations or no. of rows p=no. of columns seed= seed for generating uniform r.v. OUTPUT: x which is n X p ********************************************************/ proc (1)=cauchy(n,p,seed); local e,x,y,i,seed1; x=zeros(n,p); i=1;do while i<=p; seed1=seed+2*i; e = rndus(n,1,seed1); y = tan(pi*(e-0.5)); x[.,i]=(y-meanc(y))/stdc(y); i=i+1; endo; retp(x); endp;