Defines the ordered logistic (cumulative logit) family for modeling ordinal response variables within the gamlss2 framework. This implementation supports flexible modeling of the location and threshold (cutpoint) parameters, including effects of covariates.
Usage
ologit(k)
Arguments
k
An integer specifying the number of response categories. Must be k >= 2.
Details
This family implements a cumulative logit model for ordinal responses with k ordered categories. The linear predictor models a latent location parameter, and the cutpoints between response categories are parameterized via a monotonic transformation:
The first cutpoint is modeled directly (theta1).
The remaining cutpoints are expressed as theta1 + exp(delta_j) for j = 2, …, k - 1, ensuring that the thresholds remain ordered.
The ologit() family supports modeling the location and threshold differences (delta_j) as functions of covariates using additive predictors in gamlss2 via the “|” formula interface.
The family returns an object of class “gamlss2.family”, which includes methods for evaluating the log-likelihood, simulating from the model, and computing predicted probabilities.
Value
A “gamlss2.family” object to be used with gamlss2.
See Also
gamlss2, gamlss2.family, polr
Examples
library("gamlss2")## Example using the housing data from the MASS package:library("MASS")## Fit standard cumulative logit model using polr().m <-polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)summary(m)
Call:
polr(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq)
Coefficients:
Value Std. Error t value
InflMedium 0.5664 0.10465 5.412
InflHigh 1.2888 0.12716 10.136
TypeApartment -0.5724 0.11924 -4.800
TypeAtrium -0.3662 0.15517 -2.360
TypeTerrace -1.0910 0.15149 -7.202
ContHigh 0.3603 0.09554 3.771
Intercepts:
Value Std. Error t value
Low|Medium -0.4961 0.1248 -3.9739
Medium|High 0.6907 0.1255 5.5049
Residual Deviance: 3479.149
AIC: 3495.149
## Convert response to integer for use with gamlss2.housing$Satint <-as.integer(housing$Sat)## Fit equivalent model using gamlss2.b <-gamlss2(Satint ~ Infl + Type + Cont,data = housing, weights = Freq,family =ologit(k =3))
GAMLSS-RS iteration 1: Global Deviance = 3483.3719 eps = 0.322658
GAMLSS-RS iteration 2: Global Deviance = 3479.4958 eps = 0.001112
GAMLSS-RS iteration 3: Global Deviance = 3479.1765 eps = 0.000091
GAMLSS-RS iteration 4: Global Deviance = 3479.1514 eps = 0.000007