coxres: A Function That Fits the Cox Regression Model

View source: R/utils.R

coxresR Documentation

A Function That Fits the Cox Regression Model

Description

This function takes a survival structure such as produced by function Surv of package survival. Takes a (discretized) vector v, indexed as ss. Fits the Cox regression model of ss against v, and tests the proportional hazards assumption. Returns as a named vector of length 5: pv_logrank: the significance p-value (logrank) pvhz: the p-value for the validity of the model hrlb: the lower bound of the 95 hr: the hazard ratio hrub: the upper bound of the 95

Usage

coxres(ss, v)

Arguments

ss

A survival structure such as produced by function Surv of package survival.

v

A (discretized) vector indexed as ss.

censoring

date at which data are censored

Value

A named vector of length 5.


fchuffar/epimedtools documentation built on Feb. 3, 2024, 2:21 a.m.