make_resids: Run survival analysis and compute residuals on a phenotype...

View source: R/make_resids.R

make_residsR Documentation

Run survival analysis and compute residuals on a phenotype dataframe

Description

Run survival analysis and compute residuals on a phenotype dataframe

Usage

make_resids(
  x,
  age,
  status,
  surv_name = "surv",
  covars,
  keep_reg = FALSE,
  mgl_name = "martingale",
  dev_name = "devres",
  weighted = FALSE
)

Arguments

x

A dataframe with age, status and covariate variables

age

The name of the age variable

status

The name of the event variable

surv_name

The name of the survival variable in the returned dataframe

covars

The names of the covariates for the Cox regression

keep_reg

Indicator for the function to return the Cox regression object

mgl_name

The name of the Martingale residual variable in the returned dataframe

dev_name

The name of the deviance residual variable in the returned dataframe

weighted

Passed as the argument weighted to residuals()


Blue-Lab/blPipeline documentation built on May 12, 2022, 5:10 a.m.