Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotCorrPrecision

Plot Precision of Estimate of Pearson Correlation Coefficient


Description

This function plots the precision (margin of error) of the product-moment linear correlation coefficient r vs. sample size, for a given vector of correlation coefficients rho. Precision is defined as the larger of the upper confidence limit minus rho and rho minus the lower confidence limit. labcurve is used to automatically label the curves.

Usage

plotCorrPrecision(rho = c(0, 0.5), n = seq(10, 400, length = 100),
                  conf.int = 0.95, offset=0.025, ...)

Arguments

rho

single or vector of true correlations. A worst-case precision graph results from rho=0

n

vector of sample sizes to use on the x-axis

conf.int

confidence coefficient; default uses 0.95 confidence limits

offset

see labcurve

...

other arguments to labcurve

Author(s)

Xing Wang and Frank Harrell

See Also

Examples

plotCorrPrecision()
plotCorrPrecision(rho=0)

Hmisc

Harrell Miscellaneous

v4.5-0
GPL (>= 2)
Authors
Frank E Harrell Jr <fh@fharrell.com>, with contributions from Charles Dupont and many others.
Initial release
2021-02-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.