local_coxph_test: Compute local p-value from coxph

local_coxph_testR Documentation

Compute local p-value from coxph

Description

Checks the null hypothesis: C * beta.hat = c, i.e., the local p-value of one or more factors in a model; can also be used to test more comlex hypotheses.

Usage

local_coxph_test(object, pos, C = NULL, d = NULL, digits = 3)

Arguments

object

survival object of class coxph

pos

vector of positions of coefficients of interest from summary(coxph); defaults to seq_along(coef(s))

C, d

C, a q-by-p matrix, and d, a q-by-1 matrix, define the null hypothesis being checked; default is a global test on the variables in pos, i.e., C is the identity matrix, and d is a vector of zeros

digits

number of significant figures in output

References

http://www.ddiez.com/teac/surv/

Examples

library('survival')
fit <- coxph(Surv(time, status) ~ sex + ph.ecog, data = cancer)

## compare to summary(fit)
local_coxph_test(fit)
local_coxph_test(fit, 2)


raredd/rawr documentation built on May 19, 2024, 1:02 p.m.