Cargando…

A comparative study of R functions for clustered data analysis

BACKGROUND: Clustered or correlated outcome data is common in medical research studies, such as the analysis of national or international disease registries, or cluster-randomized trials, where groups of trial participants, instead of each trial participant, are randomized to interventions. Within-g...

Descripción completa

Detalles Bibliográficos
Autores principales: Wang, Wei, Harhay, Michael O.
Formato: Online Artículo Texto
Lenguaje:English
Publicado: BioMed Central 2021
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8711156/
https://www.ncbi.nlm.nih.gov/pubmed/34961539
http://dx.doi.org/10.1186/s13063-021-05900-7
_version_ 1784623315769360384
author Wang, Wei
Harhay, Michael O.
author_facet Wang, Wei
Harhay, Michael O.
author_sort Wang, Wei
collection PubMed
description BACKGROUND: Clustered or correlated outcome data is common in medical research studies, such as the analysis of national or international disease registries, or cluster-randomized trials, where groups of trial participants, instead of each trial participant, are randomized to interventions. Within-group correlation in studies with clustered data requires the use of specific statistical methods, such as generalized estimating equations and mixed-effects models, to account for this correlation and support unbiased statistical inference. METHODS: We compare different approaches to estimating generalized estimating equations and mixed effects models for a continuous outcome in R through a simulation study and a data example. The methods are implemented through four popular functions of the statistical software R, “geese”, “gls”, “lme”, and “lmer”. In the simulation study, we compare the mean squared error of estimating all the model parameters and compare the coverage proportion of the 95% confidence intervals. In the data analysis, we compare estimation of the intervention effect and the intra-class correlation. RESULTS: In the simulation study, the function “lme” takes the least computation time. There is no difference in the mean squared error of the four functions. The “lmer” function provides better coverage of the fixed effects when the number of clusters is small as 10. The function “gls” produces close to nominal scale confidence intervals of the intra-class correlation. In the data analysis and the “gls” function yields a positive estimate of the intra-class correlation while the “geese” function gives a negative estimate. Neither of the confidence intervals contains the value zero. CONCLUSIONS: The “gls” function efficiently produces an estimate of the intra-class correlation with a confidence interval. When the within-group correlation is as high as 0.5, the confidence interval is not always obtainable. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at (10.1186/s13063-021-05900-7).
format Online
Article
Text
id pubmed-8711156
institution National Center for Biotechnology Information
language English
publishDate 2021
publisher BioMed Central
record_format MEDLINE/PubMed
spelling pubmed-87111562022-01-05 A comparative study of R functions for clustered data analysis Wang, Wei Harhay, Michael O. Trials Research BACKGROUND: Clustered or correlated outcome data is common in medical research studies, such as the analysis of national or international disease registries, or cluster-randomized trials, where groups of trial participants, instead of each trial participant, are randomized to interventions. Within-group correlation in studies with clustered data requires the use of specific statistical methods, such as generalized estimating equations and mixed-effects models, to account for this correlation and support unbiased statistical inference. METHODS: We compare different approaches to estimating generalized estimating equations and mixed effects models for a continuous outcome in R through a simulation study and a data example. The methods are implemented through four popular functions of the statistical software R, “geese”, “gls”, “lme”, and “lmer”. In the simulation study, we compare the mean squared error of estimating all the model parameters and compare the coverage proportion of the 95% confidence intervals. In the data analysis, we compare estimation of the intervention effect and the intra-class correlation. RESULTS: In the simulation study, the function “lme” takes the least computation time. There is no difference in the mean squared error of the four functions. The “lmer” function provides better coverage of the fixed effects when the number of clusters is small as 10. The function “gls” produces close to nominal scale confidence intervals of the intra-class correlation. In the data analysis and the “gls” function yields a positive estimate of the intra-class correlation while the “geese” function gives a negative estimate. Neither of the confidence intervals contains the value zero. CONCLUSIONS: The “gls” function efficiently produces an estimate of the intra-class correlation with a confidence interval. When the within-group correlation is as high as 0.5, the confidence interval is not always obtainable. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at (10.1186/s13063-021-05900-7). BioMed Central 2021-12-27 /pmc/articles/PMC8711156/ /pubmed/34961539 http://dx.doi.org/10.1186/s13063-021-05900-7 Text en © The Author(s) 2021 https://creativecommons.org/licenses/by/4.0/Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/ (https://creativecommons.org/licenses/by/4.0/) . The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/ (https://creativecommons.org/publicdomain/zero/1.0/) ) applies to the data made available in this article, unless otherwise stated in a credit line to the data.
spellingShingle Research
Wang, Wei
Harhay, Michael O.
A comparative study of R functions for clustered data analysis
title A comparative study of R functions for clustered data analysis
title_full A comparative study of R functions for clustered data analysis
title_fullStr A comparative study of R functions for clustered data analysis
title_full_unstemmed A comparative study of R functions for clustered data analysis
title_short A comparative study of R functions for clustered data analysis
title_sort comparative study of r functions for clustered data analysis
topic Research
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8711156/
https://www.ncbi.nlm.nih.gov/pubmed/34961539
http://dx.doi.org/10.1186/s13063-021-05900-7
work_keys_str_mv AT wangwei acomparativestudyofrfunctionsforclustereddataanalysis
AT harhaymichaelo acomparativestudyofrfunctionsforclustereddataanalysis
AT wangwei comparativestudyofrfunctionsforclustereddataanalysis
AT harhaymichaelo comparativestudyofrfunctionsforclustereddataanalysis