# ci: Calculate a confidence interval for an attenuated correlation... In JonasMoss/attenuation: Correcting for Attenuation Due to Measurement Error

## Description

Calculate a confidence interval for an attenuated correlation coefficient.

## Usage

 `1` ```ci(r, N, level = 0.95, method = "corr", k = NULL) ```

## Arguments

 `r` Numeric vector of three elements in [-1,1]. `r` is the correlation between the noisy measures X' and Y', `r` is the correlation between the noisy X' and the true X, while `r` is the correlation between the noisy Y' and the true Y. `N` Numeric vector of three positive integers. `N[i]` is the sample size for `r[i]`. `level` Numeric in [0, 1]. Confidence level of the interval. Defaults to 0.95. `method` The type of confidence curve. Can be `"corr"`, `"cronbach"`, `"HS"` or `"free"`. See the details of `p_value`. `k` Numeric vector of two positive integers. `k[i]` is the number of testlets for the for `r[i+1]`. Only needed for method `"cronbach"`.

## Value

Numeric in [0, 1]. The p-value under null-hypothesis rho.

## Examples

 ```1 2 3``` ``` r = c(0.20, sqrt(0.45), sqrt(0.55)) N = c(100, 100, 100) ci(r, N) # Calculates 95% confidence set for rho. ```

JonasMoss/attenuation documentation built on Nov. 12, 2019, 4:33 a.m.