Learn R Programming

PHInfiniteEstimates (version 2.9.5)

reduceLR: Reduce a logistic regression with monotone likelihood to a conditional regression with double descending likelihood.

Description

Reduce a logistic regression with monotone likelihood to a conditional regression with double descending likelihood.

Usage

reduceLR(Z, nvec = NULL, yvec = NULL, keep, sst = NULL, verybig = 1e+07)

Value

a list with components

  • keepme indicators of which variables are retained in the reduced data set

  • moderate indicatiors of which observations are retained in the reduced data set

  • extreme indicators of which observations are removed in the reduced data set

  • toosmall indicator of whether resulting data set is too small to fit the proportional hazards regression

Arguments

Z

regression matrix

nvec

vector of sample sizes

yvec

vector of responses

keep

vector of variable names to block from consideration for removal.

sst

vector of sufficient statistics

verybig

threshold for condition number to declare colinearity.

Details

This function implements version of kolassa97;textualPHInfiniteEstimates. It is intended for use with extensions to multinomial regression as in kolassa97;textualPHInfiniteEstimates and to survival analysis as in kz19;textualPHInfiniteEstimates. The method involves linear optimization that is potentially repeated. Initial calculations were done using a proprietary coding of the simplex, in a way that allowed for later iterations to be restarted from earlier iterations; this computational advantage is not employed here, in favor of computational tools in the public domain and included in the R package lpSolve. Furthermore, kolassa97;textualPHInfiniteEstimates removed regressors that became linearly dependent using orthogonalization, but on further reflection this computation is unnecessary. Data in the examples are from mehtapatel;textualPHInfiniteEstimates, citing goorinetal87;textualPHInfiniteEstimates.

References

mehtapatelPHInfiniteEstimates

goorinetal87PHInfiniteEstimates

kolassa97PHInfiniteEstimates

kolassa16PHInfiniteEstimates

kz19PHInfiniteEstimates

Examples

Run this code
#Cancer Data
Z<-cbind(rep(1,8),c(rep(0,4),rep(1,4)),rep(c(0,0,1,1),2),rep(c(0,1),4))
dimnames(Z)<-list(NULL,c("1","LI","SEX","AOP"))
nvec<-c(3,2,4,1,5,5,9,17); yvec<-c(3,2,4,1,5,3,5,6)
reduceLR(Z,nvec,yvec,c("SEX","AOP"))
#CD4, CD8 data
Z<-cbind(1,c(0,0,1,1,0,0,1,0),c(0,0,0,0,1,1,0,1),c(0,0,0,0,0,1,1,0),c(0,1,0,1,0,0,0,1))
dimnames(Z)<-list(NULL,c("1","CD41","CD42","CD81","CD82"))
nvec<-c(7,1,7,2,2,13,12,3); yvec<-c(4,1,2,2,0,0,4,1)
reduceLR(Z,nvec,yvec,"CD41")

Run the code above in your browser using DataLab