This function computes the cdf, pdf, and associated derivatives
margins(z, th, model, x =NULL, dfM =NULL)
Arguments
z: vector of responses
th: linear combination of covariates (can be negative)
model: model for margin: "binomial" (bernoulli), "poisson", "nbinom" (mean is the parameter),"nbinom1" (p is the parameter), "geometric", "multinomial", "exponential", "weibull", "normal","t", "laplace"
x: covariates for the multinomial margin (default is NULL)
dfM: degrees of freedom for the Student margin (default is NULL)
Returns
out: Matrix of conditional cdf, derivative with respect to parameter, pdf,
Examples
out = margins(0,2.5,"binomial")
Author(s)
Pavel Krupskii and Bruno N. Remillard, January 20, 2022