Learn R Programming

glmnetcr (version 1.0.2)

cr.backward: Backward Continuation Ratio Restructure Function

Description

This is an internal function used by glmnet.cr to restructure an ordinal dataset to represent the K-1 conditionally independent likelihoods needed for fitting a backrward continuation ratio model

Usage

cr.backward(x, y)

Arguments

x
covariates to be included in the model
y
ordinal outcome

Value

  • objectYields an object where the first column y is the ordinal outcome that has been dichotomously coded and the expanded covariate matrix for the K-1 conditionally independent likelihoods

See Also

See Also as cr.forward, glmnet.cr

Examples

Run this code
data(diabetes)
x <- diabetes[,2:dim(diabetes)[2]]
y <- diabetes$y
fit <- glmnet.cr(x, y, method = "backward")

Run the code above in your browser using DataLab