Displaying 1 result from an estimated 1 matches for "coxformula".
2004 Mar 04
0
passing a formula to coxph() along with a ...
...I am making a program that allows a user to enter a formula
to be used in coxph() and then does some other stuff to it, and also allows
the user to set other options within coxph().
What is the proper way to pass a formula to a function along with a ...? I
have a function:
func <- function(coxformula, data = parent.frame(),...) {
# Cut to relevant part of function
coxmod <- coxph(formula=coxformula, data=dataframe,...)
resids <- residuals(coxmod,'dfbeta')
}
I use the function call:
func(Surv(failtime,cancer)~smoke,dataframe=dataset,robust=TRUE)
The coxph() evaluates properly....