coxphftest {coxphf}R Documentation

Penalized likelihood ratio test in Cox regression

Description

This function performs a penalized likelihood ratio test for hypotheses within a Cox regression analysis using Firth's penalized likelihood.

Usage

coxphftest(formula = attr(data, "formula"), data = sys.parent(), 
           test = ~., values, maxit = 50, maxhs = 5, epsilon = 1e-06, 
           maxstep = 2.5, firth = TRUE)

Arguments

formula a formula object, with the response on the left of the operator, and the model terms on the right. The response must be a survival object as returned by the 'Surv' function.
data a data.frame in which to interpret the variables named in the 'formula' argument.
test righthand formula of parameters to test (e.g. ~ B + D). As default the null hypothesis that all parameters are 0 is tested.
values null hypothesis values, default values are 0. For testing the hypothesis H0: B1=1 and B4=2 and B5=0, specify test= ~ B1 + B4 + B5 and values=c(1, 2, 0).
maxit maximum number of iterations (default value is 50)
maxhs maximum number of step-halvings per iterations (default value is 5). The increments of the parameter vector in one Newton-Rhaphson iteration step are halved, unless the new likelihood is greater than the old one, maximally doing maxhs halvings.
epsilon specifies the maximum allowed change in penalized log likelihood to declare convergence. Default value is 0.0001.
maxstep specifies the maximum change of (standardized) parameter values allowed in one iteration. Default value is 2.5.
firth use of Firth's penalized maximum likelihood (firth=TRUE, default) or the standard maximum likelihood method (firth=FALSE) for fitting the Cox model.

Details

This function performs a penalized likelihood ratio test on some (or all) selected parameters. It can be used to test contrasts of parameters, or factors that are coded in dummy variables. The resulting object is of the class coxphftest and includes the information printed by the proper print method.

Value

testcov the names of the tested model terms
loglik the restricted and unrestricted maximized (penalized) log likelihood
df the number of degrees of freedom related to the test
prob the p-value
call the function call
method the estimation method (penalized ML or ML)

Author(s)

Georg Heinze and Meinhard Ploner

References

Firth D (1993). Bias reduction of maximum likelihood estimates. Biometrika 80, 27–38.

Heinze G and Schemper M (2001). A Solution to the Problem of Monotone Likelihood in Cox Regression. Biometrics 57/1, 114-119.

Heinze G (1999). Technical Report 10/1999: The application of Firth's procedure to Cox and logistic regression. Section of Clinical Biometrics, Department of Medical Computer Sciences, University of Vienna, Vienna.

Heinze G and Ploner M (2002). SAS and SPLUS programs to perform Cox regression without convergence problems. Computer Methods and Programs in Biomedicine

See Also

coxphf, coxphfplot

Examples

testdata <- data.frame(list(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
                stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
                event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
                x1    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0),
                x2    =c(0, 1, 1, 1, 0, 0, 1, 0, 1, 0),
                x3    =c(1, 0, 1, 0, 1, 0, 1, 0, 1, 0)))

summary( coxphf( formula=Surv(start, stop, event) ~ x1+x2+x3, data=testdata))

# testing H0: x1=0, x2=0

coxphftest( formula=Surv(start, stop, event) ~ x1+x2+x3, test=~x1+x2,  data=testdata)


[Package coxphf version 1.0-2 Index]