Description Usage Arguments Details Value See Also Examples
computes the probability vector using cumulative logistic coefficients
1 | p.compute(alpha,decal)
|
alpha |
a vector of cumulative logistic coefficients, the first value can
be |
decal |
offset term to be applied to sums of logistic coefficients |
If alpha
has S-1
values, p.compute
returns p
of length S
. If Y
is a random variable taking values in {1,...,S}
with
probabilities p
, coefficients alpha[i]
are given by:
p[1]+...+p[i]=P(Y<=i)=exp(alpha[1]+...+alpha[i])/(1+exp(alpha[1]+...+alpha[i]))
for all i<=S-1
.
p
: a probability vector
p.compute
is the inverse function of alpha.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 <- alpha.compute(p)
#gives alpha= -Inf -1.38 0 0 1.38 0 2.19 Inf Inf
p.compute(alpha) #gives p
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.