Displaying 2 results from an estimated 2 matches for "coxmod".
Did you mean:
covmod
2004 Mar 04
0
passing a formula to coxph() along with a ...
...ph() 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. But the error is in evaluating the
residuals():
Error in model.frame(f...
2008 Dec 04
1
Formula parsing and updating
Hi all,
I can't come over a problem with formula. Suppose I have a coxmod model
with the following formula:
> somemod$formula
Surv(lebzeit, tot == 1) ~ sex + (alter >= 65) + diff3k + zelltyp_k_c +
q_nuc_3k + kar_k80_g80 + stadium
and I want to drop the stadium explanatory variable from the model with
> update(somemod, ". ~ . - stadium")
I get...