General a multivariate confidence interval for a set of scores
Usage
multivariate_ci(x, rxx, mu, sigma, ci = 0.95, v_names = names(x))
Arguments
- x
a vector of scores
- rxx
a vector reliability coefficients
- mu
a vector means
- sigma
a covariance matrix
- ci
confidence level
- v_names
a vector of names
Examples
x_wisc <- c(
vci = 130,
vsi = 130,
fri = 70,
wmi = 130,
psi = 130
)
rxx_wisc <- c(
vci = .92,
vsi = .92,
fri = .93,
wmi = .92,
psi = .88
)
R_wisc <- ("
index vci vsi fri wmi psi
vci 1.00 0.59 0.59 0.53 0.30
vsi 0.59 1.00 0.62 0.50 0.36
fri 0.59 0.62 1.00 0.53 0.31
wmi 0.53 0.50 0.53 1.00 0.36
psi 0.30 0.36 0.31 0.36 1.00") |>
readr::read_tsv() |>
tibble::column_to_rownames("index") |>
as.matrix()
#> Rows: 5 Columns: 6
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: "\t"
#> chr (1): index
#> dbl (5): vci, vsi, fri, wmi, psi
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
multivariate_ci(
x = x_wisc,
rxx = rxx_wisc,
mu = rep(100, 5),
sigma = R_wisc * 225
)
#> score x rxx mu_univariate see_univariate mu_multivariate
#> vci vci 130 0.92 127.6 4.069398 126.69804
#> vsi vsi 130 0.92 127.6 4.069398 126.11601
#> fri fri 70 0.93 72.1 3.827205 77.64056
#> wmi wmi 130 0.92 127.6 4.069398 127.29155
#> psi psi 130 0.88 126.4 4.874423 127.38539
#> see_multivariate upper_univariate lower_univariate upper_multivariate
#> vci 3.911922 135.57587 119.62413 134.36526
#> vsi 3.896561 135.57587 119.62413 133.75313
#> fri 3.685405 79.60118 64.59882 84.86382
#> wmi 3.953840 135.57587 119.62413 135.04093
#> psi 4.803025 135.95369 116.84631 136.79915
#> lower_multivariate
#> vci 119.0308
#> vsi 118.4789
#> fri 70.4173
#> wmi 119.5422
#> psi 117.9716