Stan Math Library
4.9.0
Automatic Differentiation
|
return_type_t< T_x, T_beta, T_cuts > stan::math::ordered_logistic_glm_lpmf | ( | const T_y & | y, |
const T_x & | x, | ||
const T_beta & | beta, | ||
const T_cuts & | cuts | ||
) |
Returns the log PMF of the ordinal regression Generalized Linear Model (GLM).
This is equivalent to and faster than ordered_logistic_lpmf(y, x * beta, cuts).
T_y | type of integer vector of classes. It can be either std::vector<int> or int . |
T_x | type of the matrix of independent variables (features) |
T_beta | type of the vector of weights |
T_cuts | type of the vector of cutpoints |
y | a scalar or vector of classes. If it is a scalar it will be broadcast - used for all instances. Values should be between 1 and number of classes, including endpoints. |
x | design matrix or row vector. If it is a row vector it will be broadcast - used for all instances. |
beta | weight vector |
cuts | cutpoints vector |
std::domain_error | If any class is not between 1 and the number of cutpoints plus 2 or if the cutpoint vector is not sorted in ascending order or any input is not finite |
std::invalid_argument | if container sizes mismatch. |
Definition at line 49 of file ordered_logistic_glm_lpmf.hpp.