p.compute {LCAextend} | R Documentation |
computes the probability vector using logistic coefficients
Description
computes the probability vector using cumulative logistic coefficients
Usage
p.compute(alpha,decal)
Arguments
alpha |
a vector of cumulative logistic coefficients, the first value can
be |
decal |
offset term to be applied to sums of logistic coefficients |
Details
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\leq i)=\frac{\exp(\alpha_1+...+\alpha_i)}{(1+\exp(\alpha_1+...+\alpha_i)}
for all i<=S-1
.
Value
p
: a probability vector
See Also
p.compute
is the inverse function of alpha.compute
Examples
# 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
[Package LCAextend version 1.3 Index]