Skip to content

worked in R, but not in S-Plus

2 messages · array chip, Thomas Lumley

#
Hi, 

I wrote a function that worked well in R, but not in
S-Plus, can anyone suggest a solution?
{
	cox.fit <- coxph(Surv(time.cox, status.cox) ~ x,
na.action = na.exclude, method = "breslow")
	fit.zph<-cox.zph(cox.fit,transform='log')
	fit.zph$table[,3]
}

yyy is my data frame that contains survial time,
censor status and predictor variables.
When run in S-Plus, it gave the following error
message:

Problem in model.frame.coxph(fit): Object "x" not
found

If I remove the 2nd and 3rd lines inside the function,
it worked, so definitely something is wrong in passing
the coxph object into the cox.zph().

Thanks
#
On Tue, 9 Nov 2004, array chip wrote:

            
If you change the argument of the function from x to ... it will give
  Error in eval(expr, envir, enclos) : Object "x" not found
which is almost compatible with what it does in S-PLUS.

If you want advice on how to change the behaviour in S-PLUS, this is the 
wrong list.
-thomas