reduceLR: Reduce a logistic regression with monotone likelihood to a...

Description Usage Arguments Details Value References Examples

View source: R/reduceLR.R

Description

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

Usage

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

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 \insertCitekolassa97;textualPHInfiniteEstimates. It is intended for use with extensions to multinomial regression as in \insertCitekolassa97;textualPHInfiniteEstimates and to survival analysis as in \insertCitekz19;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, \insertCitekolassa97;textualPHInfiniteEstimates removed regressors that became linearly dependent using orthogonalization, but on further reflection this computation is unnecessary. Data in the examples are from \insertCitemehtapatel;textualPHInfiniteEstimates, citing \insertCitegoorinetal87;textualPHInfiniteEstimates.

Value

a list with components

References

\insertRef

mehtapatelPHInfiniteEstimates

\insertRef

goorinetal87PHInfiniteEstimates

\insertRef

kolassa97PHInfiniteEstimates

\insertRef

kolassa16PHInfiniteEstimates

\insertRef

kz19PHInfiniteEstimates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#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")

PHInfiniteEstimates documentation built on July 24, 2021, 1:07 a.m.