predict.oglmx: Predictions from ordered discrete model

Description Usage Arguments Value

View source: R/predict.R

Description

Predictions from ordered discrete model

Usage

1
2
3
4
5
6
7
## S3 method for class 'oglmx'
predict(
  object,
  newdata = NULL,
  type = c("class", "probs", "latent", "xb"),
  ...
)

Arguments

object

An ordered discrete model computed using oglmx package

newdata

optionally, a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors are used.

type

Prediction considered. Can be 'class' (predicted label as maximum probability label, default); 'probs' (probabilities of each observation to belong to a particular class) or 'latent' (Y^* latent variable)

...

further arguments passed to or from other methods.

Value

Depends of the value of prediction type

class

Most likely label, i.e. l = \arg \max_l p_j

probs

Prediced probabilities for each label, i.e. p_ij matrix with $i$ observation index and $j$ class label

latent

Prediced value in latent space y^*


linogaliana/oglm documentation built on March 5, 2021, 8:27 p.m.