Learn R Programming

weibull4 (version 1.0.0)

posterior: Calculates the posterior distribution for Metropolis-MCMC

Description

This is an internal function of the weibull4 package

Usage

posterior(x, y, param, modes)

Arguments

x

Vector with the x values

y

Vector with the y values

param

Vector containning shape, scale, location, area and SD parameters

modes

Sets unimodal (modes=1) or bimodal (modes=2) Weibull's distribution

Value

Vector containning the posterior distribution for Metropolis-MCMC

References

https://theoreticalecology.wordpress.com/2010/09/17/metropolis-hastings-mcmc-in-r/

Examples

Run this code
# NOT RUN {
function (param)
{
    return(likelihood(param) + prior(param))
  }
# }

Run the code above in your browser using DataLab