Skip to content

Commit

Permalink
rework refs
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Jan 10, 2024
1 parent 5e718c2 commit 9d2d565
Show file tree
Hide file tree
Showing 15 changed files with 294 additions and 303 deletions.
127 changes: 127 additions & 0 deletions R/bibentries.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# nocov start

cite = function(entry){

out <- switch(
entry,
breiman_2001 = bibentry(
"article",
title = "Random Forests",
author = "Breiman, Leo",
year = "2001",
journal = "Machine Learning",
volume = "45",
number = "1",
pages = "5--32",
doi = "10.1023/A:1010933404324",
issn = "1573-0565"
),
ishwaran_2008 = bibentry(
"article",
doi = "10.1214/08-aoas169",
url = "https://doi.org/10.1214/08-aoas169",
year = "2008",
month = "9",
publisher = "Institute of Mathematical Statistics",
volume = "2",
number = "3",
author = "Hemant Ishwaran and Udaya B. Kogalur and Eugene H. Blackstone and Michael S. Lauer",
title = "Random survival forests",
journal = "The Annals of Applied Statistics"
),
jaeger_2019 = bibentry(
"article",
doi = "10.1214/19-aoas1261",
year = "2019",
month = "9",
publisher = "Institute of Mathematical Statistics",
volume = "13",
number = "3",
author = "Byron C. Jaeger and D. Leann Long and Dustin M. Long and Mario Sims and Jeff M. Szychowski and Yuan-I Min and Leslie A. Mcclure and George Howard and Noah Simon",
title = "Oblique random survival forests",
journal = "The Annals of Applied Statistics"
),
jaeger_2022 = bibentry(
"article",
title = "Accelerated and interpretable oblique random survival forests",
author = "Byron C. Jaeger and Sawyer Welden and Kristin Lenoir and Jaime L. Speiser and Matthew W. Segar and Ambarish Pandey and Nicholas M. Pajewski",
journal = "Journal of Computational and Graphical Statistics",
doi = "10.1080/10618600.2023.2231048",
year = "2023",
month = "8",
publisher = "Taylor & Francis",
pages = "1--16"
),
hooker_2021 = bibentry(
"article",
title = "Unrestricted permutation forces extrapolation: variable importance requires at least one more model, or there is no free variable importance",
author = "Hooker, Giles and Mentch, Lucas and Zhou, Siyu",
journal = "Statistics and Computing",
volume = "31",
pages = "1--16",
year = "2021",
publisher = "Springer"
),
harrell_1982 = bibentry(
"article",
title = "Evaluating the yield of medical tests",
author = "Harrell, Frank E and Califf, Robert M and Pryor, David B and Lee, Kerry L and Rosati, Robert A",
journal = "Jama",
volume = "247",
number = "18",
pages = "2543--2546",
year = "1982",
publisher ="American Medical Association"
),
menze_2011 = bibentry(
"inproceedings",
title = "On oblique random forests",
author = "Menze, Bjoern H and Kelm, B Michael and Splitthoff, Daniel N and Koethe, Ullrich and Hamprecht, Fred A",
booktitle = "Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2011, Athens, Greece, September 5-9, 2011, Proceedings, Part II 22",
pages = "453--469",
year = "2011",
organization = "Springer"
),
simon_2011 = bibentry(
"article",
title = "Regularization paths for Cox’s proportional hazards model via coordinate descent",
author = "Simon, Noah and Friedman, Jerome and Hastie, Trevor and Tibshirani, Rob",
journal = "Journal of statistical software",
volume = "39",
number = "5",
pages = "1",
year = "2011",
publisher = "NIH Public Access"
),
horst_2022 = bibentry(
"article",
title = "Palmer Archipelago Penguins Data in the palmerpenguins R Package-An Alternative to Anderson's Irises",
author = "Horst, Allison M and Hill, Alison Presmanes and Gorman, Kristen B",
journal = "R Journal",
volume = "14",
number = "1",
year = "2022"
),
penguins_2020 = bibentry(
"manual",
title = "palmerpenguins: Palmer Archipelago (Antarctica) penguin data",
author = "Allison Marie Horst and Alison Presmanes Hill and Kristen B Gorman",
year = "2020",
note = "R package version 0.1.0",
url = "https://allisonhorst.github.io/palmerpenguins/"
),
greenwell_2018 = bibentry(
"article",
title = "A simple and effective model-based variable importance measure",
author = "Greenwell, Brandon M and Boehmke, Bradley C and McCarthy, Andrew J",
journal = "arXiv preprint arXiv:1805.04755",
year = "2018"
),
stop("unrecognized entry")
)

format(out)

}

# nocov end
19 changes: 8 additions & 11 deletions R/orsf.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,23 +301,20 @@
#'
#' @references
#'
#' `r roxy_cite_harrell_1982()`
#'
#' `r roxy_cite_breiman_2001()`
#'
#' `r roxy_cite_ishwaran_2008()`
#'
#' `r roxy_cite_menze_2011()`
#'
#' `r roxy_cite_jaeger_2019()`
#'
#' `r roxy_cite_jaeger_2023()`
#' 1. `r cite("harrell_1982")`
#' 1. `r cite("breiman_2001")`
#' 1. `r cite("ishwaran_2008")`
#' 1. `r cite("menze_2011")`
#' 1. `r cite("jaeger_2019")`
#' 1. `r cite("jaeger_2022")`
#'
#' @includeRmd Rmd/orsf_examples.Rmd
#'
#' @export
#'



orsf <- function(data,
formula,
control = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/orsf_control.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ orsf_control_cph <- function(method = 'efron',
#'
#' @references
#'
#' `r roxy_cite_simon_2011()`
#' 1. `r cite("simon_2011")`
#'

orsf_control_net <- function(alpha = 1/2,
Expand Down
2 changes: 1 addition & 1 deletion R/orsf_pd.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pred_spec_auto <- function(...){
#'
#' @references
#'
#' `r roxy_cite_hooker_2021()`
#' 1. `r cite("hooker_2021")`
#'
#' @includeRmd Rmd/orsf_pd_examples.Rmd
#'
Expand Down
12 changes: 4 additions & 8 deletions R/orsf_vi.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,10 @@
#'
#' @references
#'
#'
#' `r roxy_cite_harrell_1982()`
#'
#' `r roxy_cite_breiman_2001()`
#'
#' `r roxy_cite_menze_2011()`
#'
#' `r roxy_cite_jaeger_2023()`
#' 1. `r cite("harrell_1982")`
#' 1. `r cite("breiman_2001")`
#' 1. `r cite("menze_2011")`
#' 1. `r cite("jaeger_2022")`
#'
#'
orsf_vi <- function(object,
Expand Down
2 changes: 1 addition & 1 deletion R/orsf_vint.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#'
#' @references
#'
#' `r roxy_cite_greenwell_2018()`
#' 1. `r cite("greenwell_2018")`
#'
#' @examples
#'
Expand Down
160 changes: 0 additions & 160 deletions R/roxy.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,166 +138,6 @@ roxy_na_action_impute_meanmode <- function(data_label){
}


# citations ---------------------------------------------------------------



roxy_cite <- function(authors,
title,
journal = NULL,
date,
number=NULL,
doi=NULL,
url=NULL){

if(!is.null(number)) number <- paste0('; ', number)
if(!is.null(doi)) doi <- paste(" DOI:", doi)
if(!is.null(url)) url <- paste(" URL:", url)
if(!is.null(journal)) journal <- paste0('*', journal, '*. ')

ending <- paste(c(doi, url), collapse = '.')

paste0(
authors, '. ',
title, '. ',
journal,
date,
number, '.',
ending
)
}

roxy_cite_breiman_2001 <- function(){

roxy_cite(
authors = "Breiman L",
title = "Random forests",
journal = "Machine learning",
date = "2001 Oct",
number = "45(1):5-32",
doi = "10.1023/A:1010933404324"
)

}

roxy_cite_ishwaran_2008 <- function(){

roxy_cite(
authors = "Ishwaran H, Kogalur UB, Blackstone EH, Lauer MS",
title = "Random survival forests",
journal = "Annals of applied statistics",
date = "2008 Sep",
number = "2(3):841-60",
doi = "10.1214/08-AOAS169"
)

}

roxy_cite_jaeger_2019 <- function(){

roxy_cite(
authors = "Jaeger BC, Long DL, Long DM, Sims M, Szychowski JM, Min YI, Mcclure LA, Howard G, Simon N",
title = "Oblique random survival forests",
journal = "Annals of applied statistics",
date = "2019 Sep",
number = "13(3):1847-83",
doi = "10.1214/19-AOAS1261"
)

}

roxy_cite_jaeger_2023 <- function(){

roxy_cite(
authors = "Jaeger BC, Welden S, Lenoir K, Speiser JL, Segar MW, Pandey A, Pajewski NM",
title = "Accelerated and interpretable oblique random survival forests",
journal = "Journal of Computational and Graphical Statistics",
date = "Published online 08 Aug 2023",
number = NULL,
doi = "10.1080/10618600"
)

}

roxy_cite_hooker_2021 <- function(){

roxy_cite(
authors = "Giles Hooker, Lucas Mentch, Siyu Zhou",
title = "Unrestricted Permutation forces Extrapolation: Variable Importance Requires at least One More Model, or There Is No Free Variable Importance",
journal = "arXiv e-prints",
date = "2021 Oct",
number = 'arXiv-1905',
url = "https://doi.org/10.48550/arXiv.1905.03151"
)

}

roxy_cite_harrell_1982 <- function(){

roxy_cite(
authors = "Harrell FE, Califf RM, Pryor DB, Lee KL, Rosati RA",
title = "Evaluating the Yield of Medical Tests",
journal = "JAMA",
date = "1982",
number = '247(18):2543-2546',
doi = "10.1001/jama.1982.03320430047030"
)

}

roxy_cite_menze_2011 <- function(){

roxy_cite(
authors = "Menze BH, Kelm BM, Splitthoff DN, Koethe U, Hamprecht FA",
title = "On oblique random forests",
journal = "Joint European Conference on Machine Learning and Knowledge Discovery in Databases",
date = "2011 Sep 4",
number = 'pp. 453-469',
doi = "10.1007/978-3-642-23783-6_29"
)

}

roxy_cite_simon_2011 <- function(){

roxy_cite(
authors = "Simon N, Friedman J, Hastie T, Tibshirani R",
title = "Regularization paths for Cox's proportional hazards model via coordinate descent",
journal = "Journal of statistical software",
date = "2011 Mar",
number = '39(5):1',
doi = "10.18637/jss.v039.i05"
)

}

roxy_cite_penguins <- function(){

roxy_cite(
authors = "Horst AM, Hill AP, Gorman KB",
title = "palmerpenguins: Palmer Archipelago (Antarctica) penguin data. R package version 0.1.0",
date = "2020",
doi = "10.5281/zenodo.3960218"
)

}

roxy_cite_greenwell_2018 <- function(){

roxy_cite(
authors = "Greenwell BM, Boehmke BC, McCarthy AJ",
title = "A simple and effective model-based variable importance measure",
journal = "arXiv e-prints",
date = "2018 May 12",
number = 'arXiv:1805.04755',
url = "https://doi.org/10.48550/arXiv.1805.04755"

)

}



# ... ---------------------------------------------------------------------

roxy_dots <- function(){
Expand Down
17 changes: 5 additions & 12 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -294,19 +294,12 @@ For survival analysis, comparisons between `aorsf` and existing software are pre

## References

```{r results='asis', echo=FALSE}
1. `r aorsf:::cite("jaeger_2019")`
1. `r aorsf:::cite("jaeger_2022")`
1. `r aorsf:::cite("penguins_2020")`
1. `r aorsf:::cite("menze_2011")`
1. `r aorsf:::cite("greenwell_2018")`

cat("1. ", aorsf:::roxy_cite_jaeger_2019(), '\n\n')
cat("2. ", aorsf:::roxy_cite_jaeger_2023(), '\n\n')
cat("3. ", aorsf:::roxy_cite_penguins(), '\n\n')
cat("4. ", aorsf:::roxy_cite_menze_2011(), '\n\n')
cat("5. ", aorsf:::roxy_cite_greenwell_2018())
```


## Funding
Expand Down
Loading

0 comments on commit 9d2d565

Please sign in to comment.