* Encoding: UTF-8. comment This program computes the sample size necessary to achieve target levels of accuracy comment for correlation and partial correlation coefficients such as are reported in Table 1 in comment Algina and Olejnik (2003). comment The population correlation can be changed by changing .00 in the code rho = .00. comment The target level of accuracy can be changed by changing .05 in the code c = .05. comment The probability can be changed by changing .95 in the code prob=.95. comment The number of control variables can be changed by changing 0 in the code q=0. NEW file. INPUT PROGRAM. compute rho=.00. compute c=.05. compute prob=.95. compute #d=0. compute q=0. loop #n=q+3 to 10000. compute #df2=#n-q-2. compute rll=rho-c. compute rul=rho+c. if (rul>=1.0) rul=.99999. compute #rtul=rul/(sqrt(1-rul**2)). compute #rtll=rll/(sqrt(1-rll**2)). compute #g=sqrt(2*(1-rho**2)/(2-rho**2)). compute #deltasq=((2*(#n-q)-3)*rho**2)/(2-rho**2). compute #delta=sqrt(#deltasq). compute #ul=(sqrt(#df2)*#g*#rtul). compute #sl=(sqrt(#df2)*#g*#rtll). COMPUTE #pu=NCDF.T(#ul,#df2,#delta). COMPUTE #pl=NCDF.T(#sl,#df2,#delta). COMPUTE #d=#pu-#pl. END LOOP if (#d>=prob). compute n=#n. compute prob=prob. END CASE. END FILE. END INPUT PROGRAM. EXECUTE.