sim.ci.cor: Simulates confidence interval coverage probability for a Pearson
correlation
Description
Performs a computer simulation of confidence interval performance for a
Pearson correlation. A bias adjustment is used to reduce the bias of the
Fisher transformed Pearson correlation. Sample data can be generated
from bivariate population distributions with five different marginal
distributions. All distributions are scaled to have standard deviations
of 1.0. Bivariate random data with specified marginal skewness and
kurtosis are generated using the unonr function in the mnonr package.
Usage
sim.ci.cor(alpha, n, cor, dist1, dist2, rep)
Value
Returns a 1-row matrix. The columns are:
Coverage - probability of confidence interval including population correlation
Lower Error - probability of lower limit greater than population correlation
Upper Error - probability of upper limit less than population correlation
Ave CI Width - average confidence interval width
Arguments
alpha
alpha level for 1-alpha confidence
n
sample size
cor
population Pearson correlation
dist1
type of distribution for variable 1 (1, 2, 3, 4, or 5)
dist2
type of distribution for variable 2 (1, 2, 3, 4, or 5)