I am having trouble interpreting the riskRegression()
function in the R package riskRegression
:
https://cran.r-project.org/web/packages/riskRegression/riskRegression.pdf
I looked over the examples under this function in the package vignette, but none of them actually use this function name. They use different function names such as LRR()
or ARR()
, so I am rather confused as to what the function actually does.
CodePudding user response:
You can see from the source code below that ARR()
and LRR()
are just wrappers for riskRegression(link="relative")
and riskRegression(link="logistic")
, respectively.
library(riskRegression);ARR;LRR
#> riskRegression version 2022.11.21
#> function (formula, data, times, cause, cens.model, cens.formula,
#> ...)
#> {
#> fit <- riskRegression(formula = formula, data = data, times = times,
#> link = "relative", cause = cause, cens.model = cens.model,
#> cens.formula = cens.formula, ...)
#> fit$call <- match.call()
#> fit
#> }
#> <bytecode: 0x7f99ba1e1738>
#> <environment: namespace:riskRegression>
#> function (formula, data, times, cause, cens.model, cens.formula,
#> ...)
#> {
#> fit <- riskRegression(formula = formula, data = data, times = times,
#> link = "logistic", cause = cause, cens.model = cens.model,
#> cens.formula = cens.formula, ...)
#> fit$call <- match.call()
#> fit
#> }
#> <bytecode: 0x7f99ba2232e8>
#> <environment: namespace:riskRegression>
Created on 2022-11-26 by the reprex package (v2.0.1)