Re: [R] Arbitrary number of covariates in a formula

2010-08-11 Thread Bert Gunter
number of covariates which then > leads to my original problem. > > > From: Erik Iverson [er...@ccbr.umn.edu] > Sent: Wednesday, August 11, 2010 12:00 PM > To: Mendolia, Franco > Cc: r-help@r-project.org > Subject: Re: [R] Arbitrary number of covariates in a formula &g

Re: [R] Arbitrary number of covariates in a formula

2010-08-11 Thread Henrique Dallazuanna
This shoul work: coxph(Surv(intx, status) ~ . + strata(sex) - sex, test1) On Wed, Aug 11, 2010 at 1:54 PM, Mendolia, Franco wrote: > Hello! > > I have something like this: > > test1 <- data.frame(intx=c(4,3,1,1,2,2,3), > status=c(1,1,1,0,1,1,0), > x1=c(0,2,1

Re: [R] Arbitrary number of covariates in a formula

2010-08-11 Thread Mendolia, Franco
ugust 11, 2010 1:05 PM To: Mendolia, Franco Cc: Erik Iverson; r-help@r-project.org Subject: Re: [R] Arbitrary number of covariates in a formula On Aug 11, 2010, at 1:53 PM, Mendolia, Franco wrote: > > I could do that. However, the function f that I mentioned below is > part of a bigge

Re: [R] Arbitrary number of covariates in a formula

2010-08-11 Thread David Winsemius
Mendolia, Franco Cc: r-help@r-project.org Subject: Re: [R] Arbitrary number of covariates in a formula Are you for some reason against writing your function to accept a single argument, a formula, that you simply pass on to coxph? Mendolia, Franco wrote: Hello! I have something like this: t

Re: [R] Arbitrary number of covariates in a formula

2010-08-11 Thread Mendolia, Franco
: [R] Arbitrary number of covariates in a formula Are you for some reason against writing your function to accept a single argument, a formula, that you simply pass on to coxph? Mendolia, Franco wrote: > Hello! > > I have something like this: > > test1 <- data.frame(in

Re: [R] Arbitrary number of covariates in a formula

2010-08-11 Thread Erik Iverson
Are you for some reason against writing your function to accept a single argument, a formula, that you simply pass on to coxph? Mendolia, Franco wrote: Hello! I have something like this: test1 <- data.frame(intx=c(4,3,1,1,2,2,3), status=c(1,1,1,0,1,1,0),

[R] Arbitrary number of covariates in a formula

2010-08-11 Thread Mendolia, Franco
Hello! I have something like this: test1 <- data.frame(intx=c(4,3,1,1,2,2,3), status=c(1,1,1,0,1,1,0), x1=c(0,2,1,1,1,0,0), x2=c(1,1,0,0,2,2,0), sex=c(0,0,0,0,1,1,1)) and I can easily fit a cox mo