linkinv: Computes trinomial probability distributions implied by...

View source: R/linkinv.R

linkinvR Documentation

Computes trinomial probability distributions implied by linear predictors

Description

linkinv_cat3logit and linkinv_ord3logit compute the matrix P\in[0,\,1]^{n\times 3} of probability distributions of the dependent variable for categorical and ordinal models respectively. Functions X2P_cat3logit and X2P_ord3logit perform the same computation, except that the design matrix X\in\textbf{R}^{n\times k} and the coefficient matrix B\in\textbf{R}^{k\times 2} are taken as separate input arguments. linkinv and X2P apply the proper function according to the type of model passed to argument model.

Usage

linkinv(XB, model)

X2P(X, B, model)

linkinv_cat3logit(XB)

X2P_cat3logit(X, B)

linkinv_ord3logit(XB, alpha)

X2P_ord3logit(X, B, alpha)

Arguments

XB

object of class matrix (or other coercible classes) such that XB\in\textbf{R}^{n\times 2} for categorical models or XB\in\textbf{R}^n for ordinal models.

model

object of class field3logit.

X

object of class matrix (or other coercible classes) such that X\in\textbf{R}^{n\times k}.

B

object of class matrix (or other coercible classes) such that B\in\textbf{R}^{k\times 2} for categorical models or B\in\textbf{R}^k for ordinal models.

alpha

numeric vector of length two where constants α^{(1)} and α^{(2)} are stored (only for ordinal models), as defined in Equation (7) of \insertCitesanti2019;textualplot3logit.

Value

Numeric matrix [0,\,1]^{n\times 3} of probability distributions.

References

\insertAllCited

See Also

linkfun.


plot3logit documentation built on July 19, 2022, 9:07 a.m.