This algorithm computes a point-wise Bayesian CI for the p parameter in change-point model on binomial process.
BayesCptCI(cases, controls, CBSRes, stepSize="adaptive", adaptMaxMix=80,
alpha=0.05, epsilon=10^-4, epsCDF=10^-4, verbose=FALSE)
A numeric vector of the case/tumor reads
A numeric vector of the control/normal reads
Output from the ScanCBS algorithm on this case/control data
An actual point-wise computation is time-consuming; by using stepSize = n, a Bayesian CI is computed at every n reads. The adaptive option gives good computational speed by choosing stepSize based on the data.
An upper bound for the number of unique weights calculated at each change point under the adaptive method. The default is 80 for an average of approximately 5000 mixture components at each point.
Defaults to 0.05 for the usual CI.
The cutoff for the likelihood ratio of a model with shifted change point compared to the ScanCBS estimated change-point. The likelihood decreases exponentially around the true point or a 'good' estimate of it. Only alternatives with above the cutoff likelihood ratio are considered plausible and integrated in following computations.
This is an error tolerance value for finding the quantile of the posterior, which is a Beta mixture distribution.
If TRUE
, then will print much information on each segmentation. For diagnostics only.
A matrix containing the location and its CI of p, each column is a location, or a strech of location if stepSize>1
The likelihood ratio for alternatives around each estimated change point
The Beta mixture components for each unique location, containing a collection of two shape parameters and the weight wk
A list containing the result of the timing of this algorithm
This method is a Bayesian point-wise CI for our change-point method. It takes model complexity (number of change points) as a given. With the ScanCBS-estimated change points, it evaluates alternatives for the change points around the estimated value and computes the likelihood of the alternative models. Through theoretical derivation, we then have the estimated probability of a case read, p, at a given read index, to have a posterior density given by Beta Mixture. We then compute the quantiles of this distribution using a safe version of Newton-Raphson implemented in C as the CI at this read.