--- title: "TDI estimation and inference" output: rmarkdown::html_vignette: toc: true toc_depth: 3 vignette: > %\VignetteIndexEntry{TDI estimation and inference} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ## Introduction The statistical analysis of agreement consists in the evaluation of the degree of similarity between measurements taken by different raters. Two raters would perfectly agree if we obtained the same measurements by both of them. However, in practice, the measurements obtained on the same subject or under the same conditions are generally not identical because of unavoidable errors that affect most measurement procedures. Hence, there is a need to quantify the level of agreement between raters. For quantitative measurements a way to do this is via the **total deviation index** (TDI), an unscaled agreement index based on the difference between paired-measurements of both raters. Let $X$ and $Y$ be random variables that represent a pair of continuous measurements taken by two raters. Let their difference be $D = X-Y$. The exact TDI is defined as the value of $\kappa$ that yields $\text{P}(|D|<\kappa)=p$, where $0