LL_cumulative {gspcr}R Documentation

Proportional odds model log-likelihood

Description

Computes the log-likelihood given an ordered category response vector and corresponding GLM linear predictor values.

Usage

LL_cumulative(y, x, mod)

Arguments

y

ordered factor or disjunctive table representation recording an ordinal variable with 3 or more categories.

x

data.frame (or matrix) containing predictor values.

mod

polr object containing the estimated proportional odds model.

Details

If x and y are equal to the data on which mod has been trained, this function returns the same result as the default logLink function. If x and y are new, the function returns the log-likelihood of the new data under the trained model. The log-likelihood equation is based on Agresti (2002, p. 192).

Value

A list containing:

Author(s)

Edoardo Costantini, 2022

References

Agresti, A. (2012). Categorical data analysis (Vol. 792). John Wiley & Sons.


[Package gspcr version 0.9.5 Index]