[R] integration over a simplex

RAVI VARADHAN rvaradhan at jhmi.edu
Tue Jul 10 16:54:24 CEST 2007

Hi Robin,

A Monte-Carlo approach could be attempted, if one could generate samples that are either uniformly distributed over the simplex.  There is a small section in Luc Devroye's book (Generation of Non-uniform random deviates) on random uniform sampling from a simplex, if I remeber correctly.
Another approach is importance sampling, where the sampling points have a characterized distribution.  I have seen a technique called polyEDA, based on Gibbs sampling and truncated multivariate normal distribution.  I had previously emailed the authors of this approach for the code, but haven't received a reply yet.  You can google "polyEDA" for more info.  

I am interested in various computational problems related to polyhedra (e.g. enumeration of vertices, locating extrema, random sampling).  I would appreciate if you'd keep me posted on how you solved this problem.  


----- Original Message -----
From: Robin Hankin <r.hankin at noc.soton.ac.uk>
Date: Tuesday, July 10, 2007 6:58 am
Subject: [R] integration over a simplex
To: RHelp help <r-help at stat.math.ethz.ch>

> Hello
>  The excellent adapt package integrates over multi-dimensional
>  hypercubes.
>  I want to integrate over a multidimensional simplex.  Has anyone
>  implemented such a thing in R?
>  I can transform an n-simplex to a hyperrectangle
>  but the Jacobian is a rapidly-varying (and very lopsided)
>  function and this is making adapt() slow.
>  [
>  A \dfn{simplex} is an n-dimensional analogue of a triangle or  
>  tetrahedron.
>  It is the convex hull of (n+1) points in an n-dimensional Euclidean  
>  space.
>  My application is a variant of the Dirichlet distribution:
>  With p~D(a), if length(p) = n+1 then the requirement that
>  all(p>0) and sum(p)=1 mean that the support of the
>  Dirichlet distribution is an n-simplex.
>  ]
>  --
>  Robin Hankin
>  Uncertainty Analyst
>  National Oceanography Centre, Southampton
>  European Way, Southampton SO14 3ZH, UK
>    tel  023-8059-7743
>  ______________________________________________
>  R-help at stat.math.ethz.ch mailing list
>  PLEASE do read the posting guide 
>  and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list