Title: | Quantify and Control Reproducibility in High-Throughput Experiments |
---|---|
Description: | Estimate the proportions of the null and the reproducibility and non-reproducibility of the signal group for the input data set. The Bayes factor calculation and EM (Expectation Maximization) algorithm procedures are also included. |
Authors: | Yi Zhao [aut], Xiaoquan Wen [aut], Michael Kleinsasser [cre] |
Maintainer: | Michael Kleinsasser <[email protected]> |
License: | GPL-2 |
Version: | 0.1.0 |
Built: | 2025-02-05 02:54:27 UTC |
Source: | https://github.com/cran/INTRIGUE |
A function calculates the approximation for bayes factor, when the value of original bayes factor goes to infinity.
bf.approx(z, param, size, k2, oa2)
bf.approx(z, param, size, k2, oa2)
z |
The index for individual(i). |
param |
Input dataset. |
size |
Number of replicates(m). |
k2 |
Grid value of |
oa2 |
Grid value of |
Approximation for bayes factor in log scale.
A function that calculates bayes factor for each data pair on each grid point in log scale.
bf.cal.cefn(data, hyperparam)
bf.cal.cefn(data, hyperparam)
data |
A dataset which is constructed by pairs of coefficient
values |
hyperparam |
A two-dimensional vector denoting all the grid points,
namely, |
A list records all the log scale bayes factor values.
A function that calculates bayes factor for each data pair on each grid point in log scale.
bf.cal.meta(data, hyperparam = NULL, bf.only = FALSE)
bf.cal.meta(data, hyperparam = NULL, bf.only = FALSE)
data |
A dataset which is constructed by pairs of coefficient
values |
hyperparam |
A two-dimensional vector denoting all the grid points,
namely, |
bf.only |
A boolean, denoting whether this function is called to calculate Bayes factor for META prior only. Usually used when publication bias issue is the target. |
A list records all the log scale bayes factor values or a list records log scale bayes factor for null, reproducible and irreproducible model (when bf.only=TRUE).
A function that describes the updating process in E step and M step for EM algorithm. It will be used in SQUAREM package.
bf.em(w, bf)
bf.em(w, bf)
w |
The weight vector in previous M step. |
bf |
A vector recording all the bayes factor values in log scale. |
The updated weight vector in current M step(wnew).
Calculate the updated loglikelihood value in EM algorithm, and to evaluate whether converge or not.
bf.loglik(w, bf)
bf.loglik(w, bf)
w |
The current weight vector |
bf |
A vector recording all the bayes factor values in log scale. |
Negative summation of loglikelihood values.
A function calculates the weighted summation of bayes factor.
bf.weighted_sum(w, bf, i)
bf.weighted_sum(w, bf, i)
w |
Input weight vector. |
bf |
Input bayes factor vector |
i |
Individual index. |
Weighted sum for bayes factor in log scale.
Evaluating the overall and individually heterogeneity and reproducibility for the given individuals(units) shared in different replicates.
hetero( data, use_cefn = TRUE, rep = NULL, irre = NULL, phi_min = NULL, phi_max = NULL, sq_em_tol = 1e-04, fdr.level = NULL, sample_size = NULL )
hetero( data, use_cefn = TRUE, rep = NULL, irre = NULL, phi_min = NULL, phi_max = NULL, sq_em_tol = 1e-04, fdr.level = NULL, sample_size = NULL )
data |
A dataset which is constructed by pairs of coefficient
values |
use_cefn |
A boolean, denoting whether to use CEFN prior. If the value is TRUE, CEFN prior is used, else, META prior is applied. The default value is TRUE. |
rep |
A vector, denoting all the |
irre |
A vector, denoting all the |
phi_min |
A value which determines the maximum |
phi_max |
A value which determines the minimum |
sq_em_tol |
A small, positive scalar that determines when iterations should be terminated in squarem algorithm.
The default value is |
fdr.level |
The user-defined rejection level for false discovery rate. |
sample_size |
The user-defined sample size. |
A list with the following components:
gridweight |
The final optimal weight vector evaluated on each grid point. |
ind_prob |
A matrix denoting the converged probability for each individual being inside the three different groups, namely, the null, the reproducible and the irreproducible group. |
est_prop |
The estimated proportion value for the three different groups, namely, the null, the reproducible and the irreproducible group. |
lfdr |
The local false discovery rate based on the null hyppthesis of
unit belonging to |
significant |
If fdr.level is specified, a significant object recording True or False will be returned |
data("heterodata") hetero.out<-hetero(heterodata,fdr.level=0.05) names(hetero.out) print(hetero.out$est_prop) ## for CRAN check hetero.out<-hetero(heterodata[1:100,],fdr.level=0.05)
data("heterodata") hetero.out<-hetero(heterodata,fdr.level=0.05) names(hetero.out) print(hetero.out$est_prop) ## for CRAN check hetero.out<-hetero(heterodata[1:100,],fdr.level=0.05)
Local False Discovery Rate Evaluation
hetero.lfdr(cat, fdr.level)
hetero.lfdr(cat, fdr.level)
cat |
The final individual-level probabilities of falling into three categories, separately. |
fdr.level |
Rejection level for Local false discovery rate, if not specified, the rejection decision procedure won't be run. |
A list that preserves local false discovery rate and 5tthe corresponding reject decision if called.
This is a simulation dataset, containing n=5000 units and m=2 replicates. The true proportion for the null, the reproducible and the irreproducible group is 0.80, 0.18, 0.02 separately.
data("heterodata")
data("heterodata")
An object of class matrix
(inherits from array
) with 1000 rows and 4 columns.
data("heterodata")
data("heterodata")