SpMix: Parameter estimates of null(normal) distribution and fitted...

View source: R/SPMix.R

SPMixR Documentation

Parameter estimates of null(normal) distribution and fitted values for both alternative(nonparametric) and mixture density.

Description

SPMix returns localFDR estimates and semiparametric mixture density estimates for given multi-dimensional lists of z-values, p-values or raw data. For the hypothesis testing SPMix uses a two-component semiparametric mixture model to estimate the localFDR from the z-values. The two pillars of the proposed approach are Efron's empirical null principle and log-concave density estimation for the alternative distribution.

Usage

SPMix(
  z,
  tol = 5e-06,
  p_value = FALSE,
  alternative = "greater",
  min_iter = 3,
  max_iter = 30,
  thre_z = 1 - 1e-05,
  Uthre_gam = 0.99,
  Lthre_gam = 0.01
)

Arguments

z

Matrix which each row indicates each data point (z-values, p-values, or raw data).

tol

Stopping criteria for the EM algorithm. If maximum absolute difference of current and previous gamma value is smaller than tol, i.e. max_i |\gamma_i^{(k+1)}-\gamma_i^{(k)} <tol, for k-th step, then optimization stops. (default: 5e-6)

p_value

If TRUE, input data indicates p-values, if FALSE, it indicates z-values or raw data. (default: FALSE)

alternative

A character string specifying the alternative hypothesis, must be one of "greater" (default) or "less". You can also use the initial letter "g" or "l". (default: "greater")

min_iter

Minimum number of iterations in the EM algorithm. (default: 3)

max_iter

Maximum number of iterations in the EM algorithm. (default: 30)

thre_z

The upper threshold of gamma whose z-values are used in log-concave estimates in the M-step of the EM-type algorithm. (default: 1-1e-5)

Uthre_gam

The upper threshold of gamma which are used to compute stopping criteria for the EM algorithm. (default: 0.99)

Lthre_gam

The lower threshold of gamma which are used to compute stopping criteria for the EM algorithm. (default: 0.01)

Value

Estimates of semiparametric mixture model for given data.

z

Matrix which each row indicates each data point

p0

Prior probability for null distribution

mu0 sig0

Parameter estimates of Gaussian (null) distribution, N(mu0, sig0^2)

f

Probability estimates of semiparametric mixture model for given data.

f1

Probability estimates of log-concave (alternative) distribution of mixture model for given data.

F

Cumulative density estimates of mixture model for given data.

localFDR

localFDR estimates for given data.

FDR

FDR estimates for given data.

iter

Number of iterations of EM algorithm to compute localFDR.

dim

Dimension of the given data

alternative

A character string specifying the orientation of alternative distribution.


JungiinChoi/multiLocalFDR documentation built on Aug. 15, 2024, 1:04 a.m.