Title: | Online Bayesian Methods for Change Point Analysis |
---|---|
Description: | It implements the online Bayesian methods for change point analysis. It can also perform missing data imputation with methods from 'VIM'. The reference is Yigiter A, Chen J, An L, Danacioglu N (2015) <doi:10.1080/02664763.2014.1001330>. The link to the package is <https://CRAN.R-project.org/package=onlineBcp>. |
Authors: | Hongyan Xu [cre, aut], Ayten Yigiter [aut], Jie Chen [aut] |
Maintainer: | Hongyan Xu <[email protected]> |
License: | GPL |
Version: | 0.1.8 |
Built: | 2024-11-23 06:46:10 UTC |
Source: | CRAN |
A dataset containing the tranformed aCGH data from the genome of the fibroblast cell line GM02948
aCGH
aCGH
A data frame with 2046 rows and 1 variable:
normalized aCGH intensity
Add one data point
addDatapoint(bcp, d)
addDatapoint(bcp, d)
bcp |
current BayesCP object |
d |
additional data point to be added to the existing data |
a vector with new data point appended
A dataset containing the raw data and GC-corrected/normalized data
cnv_H2347
cnv_H2347
A data frame with 14189 rows and 2 variables:
raw read counts
normalized read counts
Combine two BayesCP objects
combine(bcp1, bcp2)
combine(bcp1, bcp2)
bcp1 |
the first BayesCP object to be combined |
bcp2 |
the second BayesCP opbject to be combined |
The combined BayesCP object. Notice that if bcp1 has n1 change points (n1 + 1 segments), and bcp2 has n2 change points (n2 + 1 segments), the combined bcp will have n1+n2 change points and n1+n2+2 segments.
A dataset containing new daily cases in the United States downloaded from the World Health Organization on August 25, 2020
covid
covid
A data frame with 219 rows and 8 variables
The report date
The code for country
Country in full name
Geographic region defined by WHO
New COVID-19 cases
Cumulative COVID-19 cases
New COVID-19 deaths
Cumulative COVID-19 deaths
Impute missing data
imputation(x, method = c("Median", "kNN"))
imputation(x, method = c("Median", "kNN"))
x |
the normalized data with missing |
method |
the imputation method |
The vector of imputed data with no missing values
Online change point detection algorithm for normally distributed data.
online_cp(x, theta = 0.9, alpha = 1, beta = 1, th_cp = 0.5, debug = FALSE)
online_cp(x, theta = 0.9, alpha = 1, beta = 1, th_cp = 0.5, debug = FALSE)
x |
the normalized data |
theta |
the probability of occurrence of a change point, default 0.9 |
alpha |
the hyperparameter of posterior distribution, default 1.0 |
beta |
the hyperparameter of posterior distribution, default 1.0 |
th_cp |
threshold level for the posterior distribution of change point, default 0.5 |
debug |
a logical value, when TRUE, will print more information |
An object of the BayesCP class
Plot BayesCP object
## S3 method for class 'BayesCP' plot(x, xlab = "Index", ylab = "x", ...)
## S3 method for class 'BayesCP' plot(x, xlab = "Index", ylab = "x", ...)
x |
the BayesCP class object to be plotted |
xlab |
the default x-axis label, default "Index" |
ylab |
the default y-axis label, default "x" |
... |
the plotting parameters passed to plot() |
No return value, called for side effects
Summarize BayesCP object
## S3 method for class 'BayesCP' summary(object, norm.test = FALSE, ...)
## S3 method for class 'BayesCP' summary(object, norm.test = FALSE, ...)
object |
the BayesCP class object to be summarized |
norm.test |
logical value for normality test, default is false |
... |
parameters passed to summary() |
An object of BayesCP class with updated summary result
x <- c(rnorm(10, 0, 1), rnorm(10, 5, 1)) bcp <- online_cp(x) summary(bcp)
x <- c(rnorm(10, 0, 1), rnorm(10, 5, 1)) bcp <- online_cp(x) summary(bcp)