Re: [R] Survival curve mean adjusted for covariate

2010-09-22 Thread Peng, C
do the same thing for female and then take the weighted average of the two means. -- View this message in context: http://r.789695.n4.nabble.com/Survival-curve-mean-adjusted-for-covariate-tp2548387p2550179.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Survival curve mean adjusted for covariate

2010-09-22 Thread Peng, C
do the same thing for female and then take the weighted average of the two means. -- View this message in context: http://r.789695.n4.nabble.com/Survival-curve-mean-adjusted-for-covariate-tp2548387p2550178.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Survival curve mean adjusted for covariate: NEED TO DO IN NEXT 2 HOURS, PLEASE HELP

2010-09-21 Thread mark.fisher123
Thanks for the help everyone - problem solved in time! -- View this message in context: http://r.789695.n4.nabble.com/Survival-curve-mean-adjusted-for-covariate-NEED-TO-DO-IN-NEXT-2-HOURS-PLEASE-HELP-tp2548484p2548854.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Survival curve mean adjusted for covariate: NEED TO DO IN NEXT 2 HOURS, PLEASE HELP

2010-09-21 Thread peter dalgaard
On Sep 21, 2010, at 15:43 , Ben Bolker wrote: > mark.fisher123 gmail.com> writes: > > [snip] >> library(survival) >> survdata<-read.csv("data.csv") >> >> ##Fit Weibull model to data >> >> WeiModel<-survreg(Surv(survdata$Time,survdata$Status)~survdata$gender) >> summary(WeiModel) >> >> P

Re: [R] Survival curve mean adjusted for covariate: NEED TO DO IN NEXT 2 HOURS, PLEASE HELP

2010-09-21 Thread Ben Bolker
mark.fisher123 gmail.com> writes: [snip] > library(survival) > survdata<-read.csv("data.csv") > > ##Fit Weibull model to data > > WeiModel<-survreg(Surv(survdata$Time,survdata$Status)~survdata$gender) > summary(WeiModel) > > P<-pweibull(n, scale=exp(WeiModel$coef[1]), shape=1/WeiModel$sca

[R] Survival curve mean adjusted for covariate: NEED TO DO IN NEXT 2 HOURS, PLEASE HELP

2010-09-21 Thread mark.fisher123
Hi I am trying to determine the mean of a Weibull function that has been fit to a data set, adjusted for a categorical covariate , gender (0=male,1=female). Here is my code: library(survival) survdata<-read.csv("data.csv") ##Fit Weibull model to data WeiModel<-survreg(Surv(survdata$Time,s