reduceLR | R Documentation |
Reduce a logistic regression with monotone likelihood to a conditional regression with double descending likelihood.
reduceLR(Z, nvec = NULL, yvec = NULL, keep, sst = NULL, verybig = 1e+07)
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. |
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.
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
mehtapatelPHInfiniteEstimates
\insertRefgoorinetal87PHInfiniteEstimates
\insertRefkolassa97PHInfiniteEstimates
\insertRefkolassa16PHInfiniteEstimates
\insertRefkz19PHInfiniteEstimates
#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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.