R/RcppExports.R

Defines functions em_hmm

Documented in em_hmm

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @title EM algorithm in combination with a non-parametric algorithm for estimation of the rLIS statistic.
#' @description Estimate the rLIS values accounting for the linkage disequilibrium across two genome-wide association studies via the four-state hidden Markov model. Apply a step-up procedure to control the FDR of replicability null.
#' @param pa_in A numeric vector of p-values from study 1.
#' @param pb_in A numeric vector of p-values from study 2.
#' @param pi0a_in An initial estimate of the null probability in study 1.
#' @param pi0b_in An initial estimate of the null probability in study 2.
#'
#' @return
#' \item{rLIS}{The estimated rLIS for replicability null.}
#' \item{fdr}{The adjusted values based on rLIS for FDR control.}
#' \item{loglik}{The log-likelihood value with converged estimates of the unknowns.}
#' \item{pi}{An estimate of the stationary probabilities of four states {(0,0), (0,1), (1,0), (1,1)}.}
#' \item{A}{An estimate of the 4-by-4 transition matrix.}
#' \item{f1}{A non-parametric estimate for the non-null probability density function in study 1.}
#' \item{f2}{A non-parametric estimate for the non-null probability density function in study 2.}
#'
#' @export
em_hmm <- function(pa_in, pb_in, pi0a_in, pi0b_in) {
    .Call(`_ReAD_em_hmm`, pa_in, pb_in, pi0a_in, pi0b_in)
}

Try the ReAD package in your browser

Any scripts or data that you put into this service are public.

ReAD documentation built on July 9, 2023, 6:38 p.m.