compute_choice_probabilities: Compute probit choice probabilities

View source: R/model_evaluation.R

compute_choice_probabilitiesR Documentation

Compute probit choice probabilities

Description

This is a helper function for choice_probabilities and computes the probit choice probabilities for a single choice situation with J alternatives.

Usage

compute_choice_probabilities(X, alternatives, parameter, ordered = FALSE)

Arguments

X

A matrix of covariates with J rows and P_f + P_r columns, where the first P_f columns are connected to fixed coefficients and the last P_r columns are connected to random coefficients.

alternatives

A vector with unique integers from 1 to J, indicating the alternatives for which choice probabilities are to be computed.

parameter

An object of class RprobitB_parameter.

ordered

A boolean, FALSE per default. If TRUE, the choice set alternatives is assumed to be ordered from worst to best.

Value

A probability vector of length length(alternatives).


loelschlaeger/RprobitB documentation built on Oct. 15, 2024, 11:08 a.m.