simplex: Definition of a multivariate simplex

View source: R/beed.R

simplexR Documentation

Definition of a multivariate simplex

Description

Generation of grid points over the multivariate simplex

Usage

simplex(d, n=50, a=0, b=1)

Arguments

d

A positive integer indicating the dimension of the simplex.

n

A positive integer indicating the number of grid points to be generated on the univariate components of the simplex.

a,b

Two numeric values indicating the lower and upper bound of the simplex. By default a=0 and b=0, indicating the unit-simplex.

Details

A d-dimensional simplex is defined by

S = { (ω_1, …, ω_d) \in R^d_+: ∑_{i=1}^d ω_i = 1 }.

Here the function defines the simplex as

S = { (ω_1, …, ω_d) \in [a,b]^d: ∑_{i=1}^d ω_i = 1 }.

When d=2 and [a,b]=[0,1], a grid of points of the form { (ω_1, ω_2) \in [0,1]: ω_1 + ω_2 = 1 }.

Value

Returns a matrix with d columns. When d=2, the number of rows is n. When d>2, the number of rows is equal to

∑_{i_{d-1}=0}^{n-1} ∑_{i_{d-2}=0}^{n-i_{d-1}} \cdots ∑_{i_{1}=1}^{n-i_{d-1}-\cdots-i_{2}} i_{1}

Author(s)

Simone Padoan, simone.padoan@unibocconi.it, https://faculty.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com https://www.borisberanger.com;

Examples


### 3-dimensional unit simplex

W <- simplex(d=3, n=10)
plot(W[,-3], pch=16)


ExtremalDep documentation built on March 7, 2023, 3:16 p.m.