Re: [R] How do I specify a partially completed survival analysis model?

2009-11-23 Thread Marc Schwartz
On Nov 23, 2009, at 12:50 PM, David Winsemius wrote: On Nov 20, 2009, at 1:27 PM, David Winsemius wrote: On Nov 20, 2009, at 11:07 AM, RWilliam wrote: In reply to suggestion by David W., setting an offset parameter doesn't seem to work as R is not recognizing the "X2" part of coxph( S

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-23 Thread David Winsemius
On Nov 20, 2009, at 1:27 PM, David Winsemius wrote: On Nov 20, 2009, at 11:07 AM, RWilliam wrote: In reply to suggestion by David W., setting an offset parameter doesn't seem to work as R is not recognizing the "X2" part of coxph( Surv(Time,Censor)~X1, offset=log(4.3*X2), data= a ). Als

Re: [R] How do I specify a partially completed survival analysis model

2009-11-20 Thread Terry Therneau
--- begin inclusion -- After I simulate Time and Censor data vectors denoting the censoring time and status respectively, I can call the following function to fit the data into the Cox model (a is a data.frame containing 4 columns X1, X2, Time and Censor): b = coxph (Surv (Time, Censor) ~ X1 + X2,

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-20 Thread David Winsemius
On Nov 20, 2009, at 11:07 AM, RWilliam wrote: In reply to suggestion by David W., setting an offset parameter doesn't seem to work as R is not recognizing the "X2" part of coxph( Surv(Time,Censor)~X1, offset=log(4.3*X2), data= a ). Also, here's some sample data: The problem, arising as

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-20 Thread RWilliam
In reply to suggestion by David W., setting an offset parameter doesn't seem to work as R is not recognizing the "X2" part of coxph( Surv(Time,Censor)~X1, offset=log(4.3*X2), data= a ). Also, here's some sample data: X1 X2 TimeCensor 1 1 0.40619454 77.00666

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-20 Thread David Winsemius
On Nov 20, 2009, at 9:57 AM, David Winsemius wrote: On Nov 20, 2009, at 9:46 AM, RWilliam wrote: Sorry for being impatient but is there really no way of doing this at all? It's quite urgent so any help is very much appreciated. Thank you. The general method with glm's to specify a mod

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-20 Thread David Winsemius
On Nov 20, 2009, at 9:46 AM, RWilliam wrote: Sorry for being impatient but is there really no way of doing this at all? It's quite urgent so any help is very much appreciated. Thank you. The general method with glm's to specify a model with fixed coefficients is to use an offset. I bel

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-20 Thread RWilliam
Sorry for being impatient but is there really no way of doing this at all? It's quite urgent so any help is very much appreciated. Thank you. RWilliam wrote: > > Hello, > > I just started using R to do epidemiologic simulation research using the > Cox proportional hazard model. I have 2 covar

[R] How do I specify a partially completed survival analysis model?

2009-11-19 Thread RWilliam
Hello, I just started using R to do epidemiologic simulation research using the Cox proportional hazard model. I have 2 covariates X1 and X2 which I want to model as h(t,X)=h0(t)*exp(b1*X1+b2*X2). I assume independence of X from t. After I simulate Time and Censor data vectors denoting the cens