prob2stick: transform a vector of probabilities that sum to one to stick...

View source: R/utils.R

prob2stickR Documentation

transform a vector of probabilities that sum to one to stick proportions.

Description

transform a vector of probabilities that sum to one to stick proportions.

Usage

prob2stick(x)

Arguments

x

a vector of probabilities (K); sums to 1

Value

a vector K, with last element of 1; the elements are stick lengths in the remaining part

Examples


prob2stick(c(0.5,0.2,0.3))


zhenkewu/lotR documentation built on April 24, 2022, 2:36 a.m.