comment This program computes a confidence interval for the comment squared multiple correlation coefficient for the design comment in which values of the independent variables are sampled. comment To use the program you input comment n--the sample size comment k--the number of predictors comment rsq--the sample squared multiple correlation coefficient comment conlevel--the confidence level for the interval. NEW file. INPUT PROGRAM. compute n= 50. compute k=5. compute rsq=0.30. compute conlev=.95. compute #pul=(1-conlev)/2. compute #pll=1-(1-conlev)/2. compute #df1=n-1. compute #df2=n-k-1. compute #rtildsq=rsq/(1-rsq). compute #switch=0. compute #switch1=0. compute #test=cdf.f((n-k-1)*#rtildsq/k,k,n-k-1). do if (#test <=#pul). compute #switch=1. compute llrhosq=0. compute ulrhosq=0. end if. do if (#test <=#pll). compute #switch1=1. compute llrhosq=0. end if. compute #x2=1.0. compute #x1=.00. compute #diff3=1. do if #switch=0. loop if (abs(#diff3)>.00001). compute #x3=(#x1+#x2)/2. compute #yy=#x3/(1-#x3). compute #gamma=sqrt(1+#yy). compute #phi1=#df1*(#gamma**2-1)+k. compute #phi2=#df1*(#gamma**4-1)+k. compute #phi3=#df1*(#gamma**6-1)+k. compute #g=(#phi2-(sqrt(#phi2**2-#phi1*#phi3)))/#phi1. compute #nu=(#phi2-2*#yy*#gamma*(sqrt(#df1*#df2)))/#g**2. compute #lambdau=#yy*#gamma*(sqrt(#df1*#df2))/#g**2. compute #limit=#df2*#rtildsq/(#nu*#g). compute #diff3=ncdf.f(#limit,#nu,#df2,#lambdau)-#pul. compute #yy=#x1/(1-#x1). compute #gamma=sqrt(1+#yy). compute #phi1=#df1*(#gamma**2-1)+k. compute #phi2=#df1*(#gamma**4-1)+k. compute #phi3=#df1*(#gamma**6-1)+k. compute #g=(#phi2-(sqrt(#phi2**2-#phi1*#phi3)))/#phi1. compute #nu=(#phi2-2*#yy*#gamma*(sqrt(#df1*#df2)))/#g**2. compute #lambdau=#yy*#gamma*(sqrt(#df1*#df2))/#g**2. compute #limit=#df2*#rtildsq/(#nu*#g). compute #diff1=ncdf.f(#limit,#nu,#df2,#lambdau)-#pul. do if (#diff1*#diff3<0). compute #x2=#x3. else. compute #x1=#x3. end if. end loop. compute ulrhosq=#x3. end if. compute #x2=1.0. compute #x1=.00. compute #diff3=1. do if #switch =0 & #switch1=0. loop if (abs(#diff3)>.00001). compute #x3=(#x1+#x2)/2. compute #yy=#x3/(1-#x3). compute #gamma=sqrt(1+#yy). compute #phi1=#df1*(#gamma**2-1)+k. compute #phi2=#df1*(#gamma**4-1)+k. compute #phi3=#df1*(#gamma**6-1)+k. compute #g=(#phi2-(sqrt(#phi2**2-#phi1*#phi3)))/#phi1. compute #nu=(#phi2-2*#yy*#gamma*(sqrt(#df1*#df2)))/#g**2. compute #lambdau=#yy*#gamma*(sqrt(#df1*#df2))/#g**2. compute #limit=#df2*#rtildsq/(#nu*#g). compute #diff3=ncdf.f(#limit,#nu,#df2,#lambdau)-#pll. compute #yy=#x1/(1-#x1). compute #gamma=sqrt(1+#yy). compute #phi1=#df1*(#gamma**2-1)+k. compute #phi2=#df1*(#gamma**4-1)+k. compute #phi3=#df1*(#gamma**6-1)+k. compute #g=(#phi2-(sqrt(#phi2**2-#phi1*#phi3)))/#phi1. compute #nu=(#phi2-2*#yy*#gamma*(sqrt(#df1*#df2)))/#g**2. compute #lambdau=#yy*#gamma*(sqrt(#df1*#df2))/#g**2. compute #limit=#df2*#rtildsq/(#nu*#g). compute #diff1=ncdf.f(#limit,#nu,#df2,#lambdau)-#pll. do if #diff1*#diff3<0. compute #x2=#x3. else. compute #x1=#x3. end if. end loop. compute llrhosq=#x3. end if. end case. END FILE. END INPUT PROGRAM. execute. list variables=n k rsq conlev llrhosq ulrhosq/cases=1/format=numbered. execute.