Here are some options for confidence intervals. #by hand sample_r <- .5 n_sample <- 100 df <- n_sample-1 fisher_z <- 0.5*(log(1+sample_r)-log(1-sample_r)) se_z <- 1/sqrt(n_sample-3) t_crit <- qt(.975,df ,lower.tail=TRUE) z_lci <- fisher_z - (t_crit * se_z) z_uci <- fisher_z + (t_crit * se_z)
(r_lci <- tanh(z_lci)) (r_uci <- tanh(z_uci)) # Compare to the CIr function in psychometric library #that uses standard normal instead of t library(psychometric) CIr(sample_r,n_sample) And see http://www.stat.umn.edu/geyer/5601/examp/bse.html for bootstrap options. On Thu, Aug 27, 2009 at 3:03 PM, Donald Braman <dbra...@law.gwu.edu> wrote: > I want the standard error associated with a correlation. I can calculate > using cor & var, but am wondering if there are libraries that already > provide this function. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.