Learn R Programming

agfh (version 0.2.1)

map_from_density: Calculate the MAP Estimate from Posterior Samples

Description

Find maximum a posteriori estimate using posterior samples

Usage

map_from_density(param.ts, plot=FALSE)

Value

Scalar MAP estimate.

Arguments

param.ts

vector of scalar samples

plot

boolean, plot or not

Details

Finds location of max of density from samples.

Examples

Run this code
  n.post.samp <- 10
  beta.samp <- rnorm(n.post.samp, 0, 1/2)

  map_from_density(beta.samp)

Run the code above in your browser using DataLab