cl_Xstar: Function to calculate the negative structure vector matrix X*...

View source: R/cl_Xstar.R

cl_XstarR Documentation

Function to calculate the negative structure vector matrix X* for a cumulative link model.

Description

Function to calculate the negative structure vector matrix X* for a cumulative link model.

Usage

cl_Xstar(y, X, label = TRUE, rational = FALSE)

Arguments

y

an ordinal outcome variable. Should be an ordered factor else we order increasingly in an alpha-numeric fashion.

X

a design matrix, e.g. generated via a call to 'model.matrix'. This means we expect that X already contains the desired contrasts for factors (e.g., dummies) and any other expanded columns (e.g., for polynomials). For this function we also assume the X to either have an intercept column labeled with a string as *ntercept*, or not having an intercept column.

label

should the structure vector matrix have row and column labels?

rational

should the structure vectors been given in rational format?

Details

If X is given as the standard R object for design matrices (i.e., a numeric matrix) or as a data frame, they are returned the same way unless rational=TRUE; then it is returned as a character matrix of rational numbers. If X is given in rational format, it is also returned as rational format even if rational is set to FALSE.

Value

a matrix of negative structure vectors with or without labels


divoRce documentation built on April 28, 2026, 3:01 a.m.

Related to cl_Xstar in divoRce...