* Encoding: UTF-8. comment This program computes the sample size necessary to achieve target levels of power comment for correlation and partial correlation coefficients such as are reported in Tables 4 and 5 in comment Algina and Olejnik (2003). comment The population correlation can be changed by changing .05 in the code rho = .05. comment The number of control variables can be changed by changing 0 in the code q=0. comment The Type I error rate can be changed by changing .05 in the code alpha = .05. comment The number of tails can be changed by changing 2 to 1 in the code ntails=2. comment The target power can be changed by changing .50 in the code tpower=.50. NEW file. INPUT PROGRAM. compute rho=.05. compute q=0. compute alpha=.05. compute tails = 2. compute tpower =.50. loop #nn = q + 3 to 10000. compute #prob=1-alpha. if (tails=2) #prob=1-alpha/2. compute #df=#nn-q-2. compute #cval=IDF.T(#prob,#nn-2). compute #g=sqrt(2*(1-rho**2)/(2-rho**2)). compute #deltasq=((2*(#nn-q)-3)*rho**2)/(2-rho**2). compute #delta=sqrt(#deltasq). compute #p=1-NCDF.T(#g*#cval,#df,#delta). END LOOP if (#p>=tpower). compute power=#p. compute n=#nn. END CASE. END FILE. END INPUT PROGRAM. EXECUTE.