Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

post_sample

post_sample


Description

returns random samples from the posterior, given a prior distribution m and n observed datapoints.

Usage

post_sample(m, data, nsamp)

Arguments

m

prior distribution (eg of type normalmix)

data

a list with components x and s, each vectors of length n, to be interpreted as a normally-distributed observations and corresponding standard errors

nsamp

number of random samples to return for each observation

Details

exported, but mostly users will want to use 'get_post_sample'

Value

an nsamp by n matrix


ashr

Methods for Adaptive Shrinkage, using Empirical Bayes

v2.2-47
GPL (>= 3)
Authors
Matthew Stephens [aut], Peter Carbonetto [aut, cre], Chaoxing Dai [ctb], David Gerard [aut], Mengyin Lu [aut], Lei Sun [aut], Jason Willwerscheid [aut], Nan Xiao [aut], Mazon Zeng [ctb]
Initial release
2020-02-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.