Ztest: Wald's test on the Concordance Correlation Coefficient

View source: R/Ztest.R

ZtestR Documentation

Wald's test on the Concordance Correlation Coefficient

Description

Wald's test is applied to assess whether the CCC (ICC) is greater than a reference value. Additionally, Wald's test is also used to compare two independent CCC (ICC).

Usage

Ztest(cccfit, cccfit2 = NULL, r0 = 0, info = TRUE)

Arguments

cccfit

An object of class ccc.

cccfit2

An object of class ccc.

r0

Integer. Null hypothesis value.

info

Logical. Should information about the transformation used be printed?

Details

If only one ccc is provided, the function runs a one sided test to the null hypothesis value

\rho_0

.

z=\frac{\hat{\theta}-\rho_0}{SE\left(\hat{\theta}\right)}

where

\hat{\theta}

stands for the CCC estimate and

SE\left(\hat{\theta}\right)

its standard error. If a second CCC is provided, the function runs a two-sided test to the null hypothesis of equality of CCCs.

z=\frac{\hat{\theta_1}-\hat{\theta_2}}{\sqrt{Var\left(\hat{\theta_1}\right)}+Var\left(\hat{\theta_2}\right)}

. In both cases, the p-value is computed as

P\left(X>z\right)

where X follows a standard Normal distribution. The test uses the transformation indicated when the ccc object was generated.

Value

A data frame with two columns: Z, the statistical test value; and the P-value associated.

Examples


# Testing the CCC is above 0.8
ccc_mc=ccc_vc(bpres,"DIA","ID","METODE")
ccc_mc
Ztest(ccc_mc,r0=0.8)

# Comparing two CCC

bpres_Male <- bpres |> dplyr::filter(SEXO==1)
bpres_Female <- bpres |> dplyr::filter(SEXO==2)

ccc_DIA_Male=ccc_vc(bpres_Male,"DIA","ID","METODE")
ccc_DIA_Female=ccc_vc(bpres_Female,"DIA","ID","METODE")
Ztest(ccc_DIA_Male,ccc_DIA_Female)


cccrm documentation built on Oct. 19, 2024, 9:06 a.m.