Learn R Programming

diveMove (version 1.6.4)

calc.p: Utilities for Poisson mixture analyses

Description

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).

Usage

calc.p(coefs)

build.p.lambda(x)

logit(p)

unLogit(logit)

Value

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.

Arguments

coefs

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

x

numeric vector of coefficients

p

numeric vector of proportions (0-1) to transform to the logit scale.

logit

numeric scalar: logit value to transform back to original scale.

Author

Sebastian P. Luque spluque@gmail.com