MixfMRI (version 0.1-0)

Density function of p-values: 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.

Value

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

Details

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

References

http://maitra.public.iastate.edu/

See Also

gendataset(), qvalue().

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab