computes cumulative logistic coefficients using probabilities.

1 |

`p` |
a vector of probabilities (positive entries summing to 1). |

If `p`

has one value (equal to 1) `alpha.compute`

returns `NA`

, if it has `S (S>=2)`

values, `alpha.compute`

returns `S-1`

coefficients
`alpha`

such that if `Y`

is a random variable taking values in `{1,...,S}`

with probabilities `p`

, coefficients `alpha[i]`

are given by:

*
\code{p[1]+...+p[i]=P(Y<=i)=exp(alpha[1]+...+alpha[i])/(1+exp(alpha[1]+...+alpha[i]))}, *

for all `i<=S-1`

.

The function returns `alpha`

: a vector of `S-1`

cumulative logistic coefficients.

`alpha.compute`

is the inverse function of `p.compute`

1 2 3 4 5 | ```
# a vector of probability
p <- c(0,0.2,0,0,0.3,0.4,0.1,0,0)
alpha.compute(p)
#gives -Inf -1.38 0 0 1.38 0 2.19 Inf Inf
p.compute(alpha.compute(rep(1/5,5)))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.