get_estimated_pi: Return the estimated mixture proportions

Description Usage Arguments Details Value Examples

View source: R/get_functions.R

Description

Return the estimated mixture proportions

Usage

1
get_estimated_pi(m, dimension = c("cov", "grid", "all"))

Arguments

m

the mash result

dimension

indicates whether you want the mixture proportions for the covariances, grid, or all

Details

If the fit was done with 'usepointmass=TRUE' then the first element of the returned vector will correspond to the null, and the remaining elements to the non-null covariance matrices. Suppose the fit was done with $K$ covariances and a grid of length $L$. If 'dimension=cov' then the returned vector will be of length $K$ (or $K+1$ if 'usepointmass=TRUE'). If 'dimension=grid' then the returned vector will be of length $L$ (or $L+1$). If 'dimension=all' then the returned vector will be of length $LK$ (or $LK+1$). The names of the vector will be informative for which combination each element corresponds to.

Value

a named vector containing the estimated mixture proportions.

Examples

1
2
3
4
simdata = simple_sims(50,5,1)
data = mash_set_data(simdata$Bhat, simdata$Shat)
m = mash(data, cov_canonical(data))
get_estimated_pi(m)

mashr documentation built on May 24, 2021, 1:06 a.m.