calc.p
computes p
(proportion) parameter from a
and lambda
coefficients in a broken stick model.
build.p.lambda
parses the x
vector, usually returned by
the coef
method, where \(x =
(p_0,\dots,p_n,\lambda_1,\dots,\lambda_{n+1})\),
and build a named list with p
and lambda
elements to use
in fitting functions.
logit
and unLogit
are helpful for reparameterizing the
negative maximum likelihood function, if using Langton et al. (1995).
calc.p(coefs)build.p.lambda(x)
logit(p)
unLogit(logit)
numeric vector with proportion parameters implied by
coefs
.
named (p
, lambda
) list with parsed coefficients.
unLogit
and logit
return a numeric vector with
the (un)transformed arguments.
numeric matrix [2,N] of coefficients (a
and
lambda
) in rows for each process of the model in columns.
Columns are assumed to be in decreasing order with respect to
lambda
numeric vector of coefficients
numeric vector of proportions (0-1) to transform to the logit scale.
numeric scalar: logit value to transform back to original scale.
Sebastian P. Luque spluque@gmail.com