Type: | Package |
Title: | Online Bayesian Methods for Change Point Analysis |
Version: | 0.1.8 |
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. |
License: | GPL-2 | GPL-3 [expanded from: GPL] |
Depends: | R (≥ 3.1.0) |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.2 |
Imports: | VIM |
Suggests: | knitr, rmarkdown, testthat |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2022-05-26 17:57:22 UTC; HXU |
Author: | Hongyan Xu [cre, aut], Ayten Yigiter [aut], Jie Chen [aut] |
Maintainer: | Hongyan Xu <hxu@augusta.edu> |
Repository: | CRAN |
Date/Publication: | 2022-05-31 13:40:02 UTC |
Transformed aCGH data
Description
A dataset containing the tranformed aCGH data from the genome of the fibroblast cell line GM02948
Usage
aCGH
Format
A data frame with 2046 rows and 1 variable:
- transNorm
normalized aCGH intensity
Add one data point
Description
Add one data point
Usage
addDatapoint(bcp, d)
Arguments
bcp |
current BayesCP object |
d |
additional data point to be added to the existing data |
Value
a vector with new data point appended
GC-corrected data for copy number variation
Description
A dataset containing the raw data and GC-corrected/normalized data
Usage
cnv_H2347
Format
A data frame with 14189 rows and 2 variables:
- raw.count
raw read counts
- normalized.count
normalized read counts
Combine two BayesCP objects
Description
Combine two BayesCP objects
Usage
combine(bcp1, bcp2)
Arguments
bcp1 |
the first BayesCP object to be combined |
bcp2 |
the second BayesCP opbject to be combined |
Value
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.
US COVID-19 data
Description
A dataset containing new daily cases in the United States downloaded from the World Health Organization on August 25, 2020
Usage
covid
Format
A data frame with 219 rows and 8 variables
- Date_reported
The report date
- Country_code
The code for country
- Country
Country in full name
- WHO_region
Geographic region defined by WHO
- New_cases
New COVID-19 cases
- Cumulative_cases
Cumulative COVID-19 cases
- New_deaths
New COVID-19 deaths
- Cumulative_deaths
Cumulative COVID-19 deaths
Impute missing data
Description
Impute missing data
Usage
imputation(x, method = c("Median", "kNN"))
Arguments
x |
the normalized data with missing |
method |
the imputation method |
Value
The vector of imputed data with no missing values
Online change point detection algorithm for normally distributed data.
Description
Online change point detection algorithm for normally distributed data.
Usage
online_cp(x, theta = 0.9, alpha = 1, beta = 1, th_cp = 0.5, debug = FALSE)
Arguments
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 |
Value
An object of the BayesCP class
Plot BayesCP object
Description
Plot BayesCP object
Usage
## S3 method for class 'BayesCP'
plot(x, xlab = "Index", ylab = "x", ...)
Arguments
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() |
Value
No return value, called for side effects
Summarize BayesCP object
Description
Summarize BayesCP object
Usage
## S3 method for class 'BayesCP'
summary(object, norm.test = FALSE, ...)
Arguments
object |
the BayesCP class object to be summarized |
norm.test |
logical value for normality test, default is false |
... |
parameters passed to summary() |
Value
An object of BayesCP class with updated summary result
Examples
x <- c(rnorm(10, 0, 1), rnorm(10, 5, 1))
bcp <- online_cp(x)
summary(bcp)