n4rci: Sample Size for CI for r

Description Usage Arguments Details Value Author(s) Examples

Description

1) Calculates the width of a confidence interval for the correlation coefficient r given the sample size (N) and the alpha level. 2) Calculates the sample size required to obtain a confidence interaval for the correlation coefficient r of a desired width (CIwidth) given alpha. 3) Calculates the alpha for a confidence interval for r given desired confidence interval width (CIwidth) and the sample size (N).

Usage

1
n4rci(CIwidth = NULL, N = NULL, alpha = NULL)

Arguments

CIwidth

A numeric between 0 and 1.00 indicating desired confidence interval width.

N

A numeric element greater than 3 indicating the desired sample size.

alpha

A numeric element between 0 and 1.00 indicating the desired alpha (Type-I error rate) level.

Details

Given two of the three arguments, calculates the result of the third. Is probably most useful for determining the sample size one needs to obtain a desired confidence interval. Note that when operated in this mode the result is not always a whole number (i.e., partial Ns are returned). Rounding up is recommended. Is second most useful for calculating the width of one's confidence interval given the sample size. Is third (least) useful for calculating alpha.

Value

No matter which mode is used, the N, the CI Width and the alpha are returned.

Author(s)

Ryne A. Sherman

Examples

1
2
3
n4rci(CIwidth=.15, N=NULL, alpha=.05) #finding the necessary N
n4rci(CIwidth=NULL, N=200, alpha=.05) #finding the CI width
n4rci(CIwidth=.3, N=120, alpha=NULL) #finding the alpha

multicon documentation built on May 2, 2019, 3:18 a.m.