Skip to content

Broken Adaptive Ridge (BAR) regression for the Fine-Gray Model

Notifications You must be signed in to change notification settings

erickawaguchi/pshBAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pshBAR

Broken Adaptive Ridge (BAR) regression for competing risks data.

Introduction

pshBAR is an R package for performing L_0-based regressions for the popular Fine-Gray model for competing risks data.

Dependencies

  • survival

Getting Started

  1. On Windows, make sure RTools is installed.
  2. In R, use the following commands to download and install pshBAR:
install.packages("devtools")
library(devtools)
install_github("erickawaguchi/pshBAR")
  1. To perform L_0-penalized regression, use the following commands in R:
library(pshBAR)
#Assume cause of interest of fstatus = 1.
fit <- pshBAR(ftime, fstatus, X, failcode = 1, cencode = 0, lambda = log(ncovs), xi = 1)
fit$coef #Extract coefficients

Examples

set.seed(10)
ftime <- rexp(200)
fstatus <- sample(0:2, 200, replace = TRUE)
cov <- matrix(runif(1000), nrow = 200)
dimnames(cov)[[2]] <- c('x1','x2','x3','x4','x5')
fit <- pshBAR(ftime, fstatus, cov, lambda = log(dim(cos)[2]), xi = 1)
fit$coef

Development

pshBAR is being developed in R Studio. If there are any questions or comments please email me at erickawaguchi[at]ucla.edu.

About

Broken Adaptive Ridge (BAR) regression for the Fine-Gray Model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published