Re: [R] survfit & number of variables != number of variable names

2012-11-19 Thread Georges Dupret
Hi! It seems the data file wasn't transmit. Please find a copy in attachment. Best, ge On 11/19/2012 09:02 AM, Terry Therneau-2 [via R] wrote: > I can't reproduce the problem. > > Tell us what version of R and what version of the survival package. > Create a reproducable example. I don't know

Re: [R] survfit & number of variables != number of variable names

2012-11-19 Thread David Winsemius
On Nov 19, 2012, at 5:33 PM, Georges Dupret wrote: > Hi David, > > Sorry for the signature files... this is automatic. I should disable that. > > Please find in attachment a copy of small.csv.gz I found it but I suspect nobody else will. I think Terry Therneau already got a copy. when you att

Re: [R] survfit & number of variables != number of variable names

2012-11-19 Thread Georges Dupret
Hi! In answer to: I noticed that you were using what might be called an "externally created Surv object". I have a memory that Terry Therneau has criticized that practice. I cannot remember if it was in exactly this situation but I might ask if setting up the model as: cox = coxph

Re: [R] survfit & number of variables != number of variable names

2012-11-19 Thread Carina Salt
Hi - I've seen a similar issue going on with survfit when using strata in the model, although I get a different error message from ge. If it helps to track down the problem (rather than confusing things further) here is some code that should reproduce the issue I've seen. I'm running R 2.15.2, wi

Re: [R] survfit & number of variables != number of variable names

2012-11-19 Thread Georges Dupret
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Terry, I attached a small data set to this email. This is what I get (I restricted the formula to avoid NA's): > surv = with(small, Surv(time=absence, event=(censored==FALSE))) > (cox.s = coxph(surv ~ bucket*(today) + strata(activity), data = >

Re: [R] survfit & number of variables != number of variable names

2012-11-19 Thread Terry Therneau
I can't reproduce the problem. Tell us what version of R and what version of the survival package. Create a reproducable example. I don't know if some variables are numeric and some are factors, how/where the "surv" object was defined, etc. Terry Therneau On 11/17/2012 05:00 AM, r-help-req

Re: [R] survfit & number of variables != number of variable names

2012-11-17 Thread David Winsemius
On Nov 16, 2012, at 6:05 PM, Georges Dupret wrote: This works ok: cox = coxph(surv ~ bucket*(today + accor + both) + activity, data = data) fit = survfit(cox, newdata=data[1:100,]) but using strata leads to problems: cox.s = coxph(surv ~ bucket*(today + accor + both) + strata(activity