GithubHelp home page GithubHelp logo

xiahui625649 / bcclong Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhiwent/bcclong

0.0 1.0 0.0 93.46 MB

贝叶斯一致性聚类(重复抽样多次聚类,评估聚类结果可靠性),包括各种类型数据,如纵向性状等

License: Other

C++ 4.31% R 4.19% HTML 91.51%

bcclong's Introduction

BCCLong

The goal of BCCLong is to compute a Bayesian Consensus Clustering (BCC) model for mixed-type longitudinal data

Description

Statistical methods for clustering a single longitudinal trajectory have been well-developed and widely used in many different medical research areas. However, it is very common these days to encounter situations where several longitudinal markers or responses are collected simultaneously in a study and there is a growing interest to examine how multiple longitudinal characteristics could collectively contribute to disaggregating disease heterogeneity. Therefore, the BCClong package has been created. BCClong is an R package for performing Bayesian Consensus Clustering (BCC) model for clustering continuous, discrete and categorical longitudinal data, which are commonly seen in many clinical studies [Lu et al., 2021]https://doi.org/10.1002/sim.9225.

Installation

You can install the development version of BCC from GitHub with:

# install.packages("devtools")
devtools::install_github("ZhiwenT/BCClong", build_vignettes = TRUE)
library("BCClong")

Overview

To list all the functions available in the package:

ls("package:BCClong")

Currently, there are 5 function in this package which are BCC.multi, BayesT, model.selection.criteria, traceplot, trajplot.

BCC.multi function performs clustering on mixed-type (continuous, discrete and categorical) longitudinal markers using Bayesian consensus clustering method with MCMC sampling and provide a summary statistics for the computed model. This function will take in a data set and multiple parameters and output a BCC model with summary statistics.

BayesT function assess the model goodness of fit by calculate the discrepancy measure T(, ) with following steps (a) Generate T.obs based on the MCMC samples (b) Generate T.rep based on the posterior distribution of the parameters (c) Compare T.obs and T.rep, and calculate the P values.

model.selection.criteria function calculates DIC and WAIC for the fitted model traceplot function visualize the MCMC chain for model parameters trajplot function plot the longitudinal trajectory of features by local and global clustering

more information can be found by using the code below after installation

?BCClong::BCC.multi
?BCClong::BayesT
?BCClong::model.selection.criteria
?BCClong::traceplot
?BCClong::trajplot

The package tree structure is provide below

- BCClong
  |- BCClong.Rproj
  |- DESCRIPTION
  |- NAMESPACE
  |- LICENSE
  |- README
  |- NEWS
  |- inst
    |- extdata
      |- Epileptic.rds
      |- PBCseq.rds
      |- MeanAdj.png
      |- procedure.png
    |-CITATION
  |- man
    |- BayesT.Rd
    |- BCC.multi.Rd
    |- model.selection.criteria.Rd
    |- traceplot.Rd
    |- trajplot.Rd
  |- R
    |- bcclong.R
    |- DiscrepancyMeasure.R
    |- modelSelection.R
    |- RcppExports.R
    |- Traceplot.R
    |- Trajplot.R
  |- src
    |- c_which.h
    |- c_which.cpp
    |- BCC.cpp
    |- Likelihood.cpp
    |- RcppExports.cpp
    |- Makevars
    |- Makevars.win
  |- vignettes
    |- ContinuousData.Rmd
    |- MixedTypeData.Rmd

Tutorials

For tutorials and plot interpretation, refer to the vignette:

browseVignettes("BCClong")

Three options include a HTMl version, source R markdown file and R code file. There are two tutorials in this package, one is for dataset with continuous data only, and the second one is for dataset with mixed type of data. Tutorial can also be found from the link below. Make sure to open the html file in browser, the github website only shows the source code.

For multiple continuous longitudinal markers only:

https://htmlpreview.github.io/?https://github.com/ZhiwenT/BCClong/blob/main/vignettes/ContinuousData.html

For multiple mixed type longitudinal markers:

https://htmlpreview.github.io/?https://github.com/ZhiwenT/BCClong/blob/main/vignettes/MixedTypeData.html

Citation for Package

citation("BCClong")

Tan, Z., Shen, C., Lu, Z. (2022) BCClong: an R package for performing Bayesian Consensus Clustering model for clustering continuous, discrete and categorical longitudinal data. URL https://github.com/ZhiwenT/BCClong

References

  • [Lu, Z., & Lou, W. (2021). Bayesian consensus clustering for Multivariate Longitudinal Data. Statistics in Medicine, 41(1), 108–127.]https://doi.org/10.1002/sim.9225

  • [Tan, Z., Shen, C., Subbarao, P., Lou, W. and Lu, Z., 2022. A Joint Modeling Approach for Clustering Mixed-Type Multivariate Longitudinal Data: Application to the CHILD Cohort Study. arXiv preprint.]https://doi.org/10.48550/arXiv.2210.08385

Maintainer

Contributions

BCClong welcomes issues, enhancement requests, and other contributions. To submit an issue, use the GitHub issues.

bcclong's People

Contributors

deemolotus avatar zhiwent avatar zl2021y avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.