Skip to content

CLINDA-AAU/loamr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

loamr: limits of agreement with the mean

loamr is an R package for performing agreement analysis on continuous measurements made by multiple observers. The package provides functions for making agreement plots and for calculating the estimate and CI for the limits of agreement with the mean proposed by Christensen et al. (2020).

Installation

loamr can be installed using the following command:

devtools::install_github("HaemAalborg/loamr")

Example

The package includes a function to simulate data from the two-way random effects model described in Christensen et al (2020):

sim <- simMD(subjects = 80, observers = 10, mu = 5)
head(sim)
#> # A tibble: 6 x 3
#>   subject observer value
#>     <int>    <int> <dbl>
#> 1       1        1  4.99
#> 2       1        2  4.51
#> 3       1        3  6.52
#> 4       1        4  5.97
#> 5       1        5  4.47
#> 6       1        6  4.20

Estimate and CI for the limits of agreements with the mean:

LOAM(sim)
#> Limits of agreement with the mean for multiple observers
#> 
#> The data has 800 observations from 80 individuals by 10 observers with 1 measurements
#> 
#> LOAM:  +/- 1.438 (1.363, 1.616)
#> 
#> sigmaA:    0.264 (0.190, 0.337)
#> sigmaB:    0.235 (0.113, 0.357)
#> sigmaE:    0.737 (0.700, 0.777)
#> ICC(A,1):  0.104 (0.057, 0.170)
#> 
#> Coverage probability for the above CIs: 95%

The S3 class includes a generic plotting function made with ggplot2 for making an agreement plot with indication of estimate and CI for the limits of agreement with the mean:

plot(LOAM(sim))

Elements of the plot is easily changed using functionalities from ggplot2. For example, changing the title:

plot(LOAM(sim)) + labs(title = "Simulated Data")

References

  1. Christensen, H. S., Borgbjerg, J., Børty, L., and Bøgsted, M. (2020) “On Jones et al.’s method for extending Bland-Altman plots to limits of agreement with the mean for multiple observers”. BMC Medical Research Methodology. https://doi.org/10.1186/s12874-020-01182-w

About

Limits of agreement with the mean - R

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published