e2_density: Density function of p-values

Density function of p-valuesR Documentation

Density function of p-values

Description

These functions based on normal assumption and transformation to derive a (mixture) density function of p-values.

Usage

  dpval(x, mu = 0, log = FALSE)
  dmixpval(x, eta, mu)

Arguments

x

support of p-values which should be between 0 and 1.

mu

hypothetical mean of testing statistics (in normal distribution) for producing p-values.

log

if return log of density.

eta

mixing proportion of K components if a mixture is assumed.

Details

Note that eta and mu in dmixpval() are of length K for K component mixtures.

Value

Corresponding density values (to the input x) are returned.

Author(s)

Wei-Chen Chen and Ranjan Maitra.

References

Chen, W.-C. and Maitra, R. (2021) “A Practical Model-based Segmentation Approach for Accurate Activation Detection in Single-Subject functional Magnetic Resonance Imaging Studies”, arXiv:2102.03639.

See Also

gendataset(), qvalue().

Examples

library(MixfMRI, quietly = TRUE)
set.seed(1234)
da <- gendataset(phantom = shepp1fMRI, overlap = 0.01)
x <- da$pval[!is.na(da$pval)][1:100]
dpval(x)
dmixpval(x, mu = da$mu, eta = da$eta)

MixfMRI documentation built on Sept. 8, 2023, 5:06 p.m.