Predictive Functions

After fitting an LRMoE model, the following predictive functions provide further insights into the dataset. These functions start with predict_ followed by a quantity of interest (e.g. mean_) listed below.

  • class: latent class probabilities and the most likely latent class;
  • mean: mean of response;
  • var: variance of response;
  • limit: limited expected value (LEV) of response, that is, $E[{min}(Y, d)]$;
  • excess: expected excess value of response, that is, $E[{max}(Y-d, 0)]$; and
  • VaRCTE: quantile (or Value-at-Risk/VaR) and conditional tail expectation (CTE, or tail-VaR/TVaR) of response.

These quantities can be calculated based on either the prior and posterior latent class probabilities, as indicated by the suffix of these functions.

  • prior: the latent class probabilities are based on the covariates X and logit regression coefficients α.
  • posterior: the latent class probabilities are based on the covariates X, logit regression coefficients α and observed values Y.

The differences of these probabilities can be found in Fung et al. (2019).

The following contains a detailed description of all predictive functions included in the package. Throughout this page, Y is a matrix of response, X a matrix of covariates, α a matrix of logit regression coefficients and model a matrix of expert functions.

LRMoE.predict_class_priorFunction
predict_class_prior(X, α)

Predicts the latent class probabilities, given covariates X and logit regression coefficients α.

Arguments

  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.

Return Values

  • prob: A matrix of latent class probabilities.
  • max_prob_idx: A matrix of the most likely latent class for each observation.
source
LRMoE.predict_class_posteriorFunction
predict_class_posterior(Y, X, α, model; 
    exact_Y = true, exposure_past = nothing)

Predicts the latent class probabilities, given observations Y, covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • Y: A matrix of responses.
  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.

Optional Arguments

  • exact_Y: true or false (default), indicating if Y is observed exactly or with censoring and truncation.
  • exposure_past: A vector indicating the time exposure (past) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • prob: A matrix of latent class probabilities.
  • max_prob_idx: A matrix of the most likely latent class for each observation.
source
LRMoE.predict_mean_priorFunction
predict_mean_prior(X, α, model; 
    exposure_future = nothing)

Predicts the mean values of response, given covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.

Optional Arguments

  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • A matrix of predicted mean values of response, based on prior probabilities.
source
LRMoE.predict_mean_posteriorFunction
predict_mean_posterior(Y, X, α, model; 
    exact_Y = true, exposure_past = nothing, exposure_future = nothing)

Predicts the mean values of response, given observations Y, covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • Y: A matrix of responses.
  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.

Optional Arguments

  • exact_Y: true or false (default), indicating if Y is observed exactly or with censoring and truncation.
  • exposure_past: A vector indicating the time exposure (past) of each observation. If nothing is supplied, it is set to 1.0 by default.
  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • A matrix of predicted mean values of response, based on posterior probabilities.
source
LRMoE.predict_var_priorFunction
predict_var_prior(X, α, model; 
    exposure_future = nothing)

Predicts the variance of response, given covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.

Optional Arguments

  • exposure_future: A vector indicating the time exposure of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • A matrix of predicted variance of response, based on prior probabilities.
source
LRMoE.predict_var_posteriorFunction
predict_var_posterior(Y, X, α, model; 
    exact_Y = true, exposure_past = nothing, exposure_future = nothing)

Predicts the variance of response, given observations Y, covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • Y: A matrix of responses.
  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.

Optional Arguments

  • exact_Y: true or false (default), indicating if Y is observed exactly or with censoring and truncation.
  • exposure_past: A vector indicating the time exposure (past) of each observation. If nothing is supplied, it is set to 1.0 by default.
  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • A matrix of predicted variance of response, based on posterior probabilities.
source
LRMoE.predict_limit_priorFunction
predict_limit_prior(X, α, model, limit; 
    exposure_future = nothing)

Predicts the limit expected value (LEV) of response, given covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.
  • limit: A matrix specifying the cutoff point.

Optional Arguments

  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • A matrix of predicted limit expected value of response, based on prior probabilities.
source
LRMoE.predict_limit_posteriorFunction
predict_limit_posterior(Y, X, α, model, limit;
    exact_Y = true, exposure_past = nothing, exposure_future = nothing)

Predicts the limit expected value (LEV) of response, given observations Y, covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • Y: A matrix of responses.
  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.
  • limit: A vector specifying the cutoff point.

Optional Arguments

  • exact_Y: true or false (default), indicating if Y is observed exactly or with censoring and truncation.
  • exposure_past: A vector indicating the time exposure (past) of each observation. If nothing is supplied, it is set to 1.0 by default.
  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • A matrix of predicted limit expected value of response, based on posterior probabilities.
source
LRMoE.predict_excess_priorFunction
predict_excess_prior(X, α, model, limit;
    exposure_future = nothing)

Predicts the excess expectation of response, given covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.
  • limit: A vector specifying the cutoff point.

Optional Arguments

  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • A matrix of predicted excess expectation of response, based on prior probabilities.
source
LRMoE.predict_excess_posteriorFunction
predict_excess_posterior(Y, X, α, model, limit;
    exact_Y = true, exposure_past = nothing, exposure_future = nothing)

Predicts the excess expectation of response, given observations Y, covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • Y: A matrix of responses.
  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.
  • limit: A vector specifying the cutoff point.

Optional Arguments

  • exact_Y: true or false (default), indicating if Y is observed exactly or with censoring and truncation.
  • exposure_past: A vector indicating the time exposure (past) of each observation. If nothing is supplied, it is set to 1.0 by default.
  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • A matrix of predicted excess expectation of response, based on posterior probabilities.
source
LRMoE.predict_VaRCTE_priorFunction
predict_VaRCTE_prior(X, α, model, p;
    exposure_future = nothing)

Predicts the p-th value-at-risk (VaR) and conditional tail expectation (CTE) of response, given covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.
  • p: A matrix of probabilities.

Optional Arguments

  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • VaR: A matrix of predicted VaR of response, based on prior probabilities.
  • CTE: A matrix of predicted CTE of response, based on prior probabilities.
source
LRMoE.predict_VaRCTE_posteriorFunction
predict_VaRCTE_posterior(Y, X, α, model, p;
    exact_Y = true, exposure_past = nothing, exposure_future = nothing)

Predicts the p-th value-at-risk (VaR) and conditional tail expectation (CTE) of response, given observations Y, covariates X, logit regression coefficients α and a specified model of expert functions.

Arguments

  • X: A matrix of covariates.
  • α: A matrix of logit regression coefficients.
  • model: A matrix specifying the expert functions.
  • p: A matrix of probabilities.

Optional Arguments

  • exact_Y: true or false (default), indicating if Y is observed exactly or with censoring and truncation.
  • exposure_past: A vector indicating the time exposure (past) of each observation. If nothing is supplied, it is set to 1.0 by default.
  • exposure_future: A vector indicating the time exposure (future) of each observation. If nothing is supplied, it is set to 1.0 by default.

Return Values

  • VaR: A matrix of predicted VaR of response, based on posterior probabilities.
  • CTE: A matrix of predicted CTE of response, based on posterior probabilities.
source