ci: Calculate a confidence interval for an attenuated correlation...

Description Usage Arguments Value Examples

View source: R/ci.R

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[1] is the correlation between the noisy measures X' and Y', r[2] is the correlation between the noisy X' and the true X, while r[3] 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.

Example output

[1] -0.1647174  0.9958587

attenuation documentation built on Nov. 8, 2019, 9:07 a.m.

Related to ci in attenuation...