Hi,
correct, the confidence-interval I was referring to is the one calculated with the fisher-transformation.
For now I have written my own function.
Later I found a script in the link you find further down. There the t-distribution is used.
Every other source uses the normal distribution.
Not sure which one is correct.
see here for script:
http://saswiki.org/images/9/92/4.KSFE-2000-rohlmann-Konfidenzintervalle-f%C3%BCr-Raten-und-Korrelationskoeffizienten-zwei-SAS-Macros.pdf
This is what I did:
# korr_int( r , n , alpha )
# F() and Finv() are the fisher-transformation and -retransformation
function F = F(r) ; F = log( (1+r)/(1-r) ) / 2 ; end
function Finv = Finv(z) ; Finv = ( ( exp(2*z) - 1 ) / ( exp(2*z) + 1 ) ) ; end
function [lb ub] = korr_int(r , n , alpha)
# fisher-transform of r
Z = F(r) ;
# width of the the confidence-interval for Z
DZ = norminv(1-((1-alpha)/2));
DZ = DZ / sqrt(n-3);
# calculate lower and upper bound of interval, retransform to original distribution
lb = Z - DZ ; lb = Finv(lb) ;
ub = Z + DZ ; ub = Finv(ub) ;
end
stn