Home > Teaching > Tutorials > Survival Analysis in R

local.coxph.test(coxph.fit, pos, C=NA, d=NA, sign.digits=3)

This function is used to compute a local p-value. Specifically, it is probably most useful to use it to find the p-value of an 'as.factor' variable but it can also be used to find the p-value of a many other more complex local tests.


coxph.fit :: This argument should be a coxph object. That is, it should be the output from the function coxph()

pos :: Given the output of coxph.fit, this is a vector of the position numbers of the explanatory variables (covariates) that will be in the local test.

C and d :: These two variables define what kind of hypothesis is being checked. Specifically, the null hypothesis is of the form: C*beta.hat = d. The default for C is the identity matrix, and the default of d is a vector of zeros. That is, the default test is a global test on the variables in pos.

sign.digits :: The number of significant digits/figures to output for the p-value.