Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ ordered_probit_lpmf() [1/2]

template<bool propto, typename T_y , typename T_loc , typename T_cut >
return_type_t< T_loc, T_cut > stan::math::ordered_probit_lpmf ( const T_y &  y,
const T_loc &  lambda,
const T_cut &  c 
)

Returns the (natural) log probability of the specified array of integers given the vector of continuous locations and array of specified cutpoints in an ordered probit model.

Typically the continuous location will be the dot product of a vector of regression coefficients and a vector of predictors for the outcome.

Template Parameters
proptoTrue if calculating up to a proportion.
T_yType of y variable - int or std::vector<int>.
T_locLocation type - Eigen vector or scalar.
T_cutCut-point type - Eigen vector or a std vector of Eigen vectors.
Parameters
yinteger or Array of integers
lambdaLocation.
cPositive increasing vectors of cutpoints.
Returns
Log probability of outcome given location and cutpoints.
Exceptions
std::domain_errorIf the outcome is not between 1 and the number of cutpoints plus 2; if the cutpoint vector contains a non-positive or non-finite value; or if the cutpoint vector is not sorted in ascending order.
std::invalid_argumentIf y and lambda are different lengths; if the cutpoint vector is empty; if y and the array of cutpoints are of different lengths.

Definition at line 48 of file ordered_probit_lpmf.hpp.