This function implements MCMC with Dirichlet process prior on a numeric vector.
1 |
y |
input numeric vector, can be either sAGP or CCF from one sample. |
alpha |
significance level. |
low.thr |
values below this threshold in |
prior |
a list of prior parameters required for |
mcmc |
a list of parameters required to run MCMC for |
Three models are evaluated in this function. 0) There is not enough events (n<5) to evaluate which model is true. 1) Normal-Uniform mixture and 2) Normal mixture with unknown number of Guassian peaks. The first model is evaluated by SampleNMM()
, and the second by MCMC fitting. The two models are compared by BIC scores and a P-value is obtained from likelihood ratio test.
A list is returned. In case of model 0, the list contains:
model |
always 0 |
In case of model 1, the list contains:
PA0 |
peak information, always equals -1. |
A |
proportion of Uniform component. |
mu |
mean of Normal component. |
sigma |
standard deviation of Normal component. |
P |
P-value |
model |
always 1 |
In case of model 2, the list contains:
PA0 |
peak information |
x,y |
density function fitted by MCMC. |
P |
P value |
model |
always 2. |
Bo Li
1 2 3 4 5 6 7 8 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.