Re: [R] simple save question

2011-07-21 Thread cherron
Hi David and Tom I was having the same problem and was reading through your threads. I finally tried: summary(fit, rmean=TRUE)$table[5] This produced the mean. Hope this works for you as well. Casey -- View this message in context: http://r.789695.n4.nabble.com/simple-save-question-tp3429148

Re: [R] simple save question

2011-07-13 Thread David Winsemius
On Jul 13, 2011, at 1:10 PM, Tom La Bone wrote: I want to assign the value of rmean from a survfit object to a variable so that it can be used in subsequent calculations, which is also what I interpreted the original poster to want. I did not understand Dr. Therneau's answer to the original

Re: [R] simple save question

2011-07-13 Thread Tom La Bone
I want to assign the value of rmean from a survfit object to a variable so that it can be used in subsequent calculations, which is also what I interpreted the original poster to want. I did not understand Dr. Therneau's answer to the original poster, so I figured I would provide a simple example a

Re: [R] simple save question

2011-07-13 Thread Sarah Goslee
Just an observation, since this email has no indication of what you're trying to get at and I'm not inspired to dig back through the list: On Wed, Jul 13, 2011 at 11:16 AM, Tom La Bone wrote: > > No cigar. This is what I get and my session info. Any suggestions? >> >> library(survival) >> library

Re: [R] simple save question

2011-07-13 Thread David Winsemius
On Jul 13, 2011, at 11:16 AM, Tom La Bone wrote: No cigar. This is what I get and my session info. Any suggestions? First think ... try this sfit <- summary(fit, rmean = "individual") sfit$table[5] Hmmm. Second think. I suppose it's also possible that some of my unsuccessful efforts last

Re: [R] simple save question

2011-07-13 Thread Tom La Bone
No cigar. This is what I get and my session info. Any suggestions? > > library(survival) > library(ISwR) > dat.s <- Surv(melanom$days,melanom$status==1) > fit <- survfit(dat.s~1) > print(fit, print.rmean=TRUE) Call: survfit(formula = dat.s ~ 1) records n.maxn.start events *rm

Re: [R] simple save question

2011-07-13 Thread David Winsemius
On Jul 13, 2011, at 7:34 AM, Tom La Bone wrote: Well, that took a bit of detective work! It was a lot more work to do it "my way" than doing it the "right way", which would have been to read the help page more carefully. Thanks. I am still not doing something right here in my efforts to

Re: [R] simple save question

2011-07-13 Thread Tom La Bone
Well, that took a bit of detective work! Thanks. I am still not doing something right here in my efforts to implement the "easy way". Can you point out my error? > > library(survival) > library(ISwR) > dat.s <- Surv(melanom$days,melanom$status==1) > fit <- survfit(dat.s~1) > print(fit, print.rmea

Re: [R] simple save question

2011-07-12 Thread David Winsemius
On Jul 12, 2011, at 5:43 PM, Tom La Bone wrote: Thank you for the reply Dr. Winsemius. Can you take your answer a step further and, in the context of the simple, reproducible example, illustrate how it is done? I would appreciate it. Tom The easy way is: > sfit <- summary(fit) > sfit$ta

Re: [R] simple save question

2011-07-12 Thread David Winsemius
On Jul 12, 2011, at 5:43 PM, Tom La Bone wrote: Thank you for the reply Dr. Winsemius. Can you take your answer a step further and, in the context of the simple, reproducible example, illustrate how it is done? I would appreciate it. Of course. Would be happy to take a stab at it but

Re: [R] simple save question

2011-07-12 Thread Tom La Bone
Thank you for the reply Dr. Winsemius. Can you take your answer a step further and, in the context of the simple, reproducible example, illustrate how it is done? I would appreciate it. Tom -- View this message in context: http://r.789695.n4.nabble.com/simple-save-question-tp3429148p3663645.htm

Re: [R] simple save question

2011-07-12 Thread David Winsemius
On Jul 12, 2011, at 2:31 PM, Tom La Bone wrote: Here is a worked example. Can you point out to me where in temp rmean is stored? Thanks. It is not. You need to read the ?print.survfit page: Value x, with the invisible flag set to prevent printing. (The default for all print functions i

Re: [R] simple save question

2011-07-12 Thread Tom La Bone
Here is a worked example. Can you point out to me where in temp rmean is stored? Thanks. Tom > library(survival) > library(ISwR) > > dat.s <- Surv(melanom$days,melanom$status==1) > fit <- survfit(dat.s~1) > plot(fit) > summary(fit) Call: survfit(formula = dat.s ~ 1) time n.risk n.event survi

Re: [R] simple save question

2011-04-06 Thread Terry Therneau
--- begin inclusion-- Hi, When I run the survfit function, I want to get the restricted mean value and the standard error also. I found out using the "print" function to do so, as shown below, The questions is, is there any way to extract these values from the print command? - en

[R] simple save question

2011-04-05 Thread xueke
Hi, When I run the survfit function, I want to get the restricted mean value and the standard error also. I found out using the "print" function to do so, as shown below, print(km.fit,print.rmean=TRUE) Call: survfit(formula = Surv(diff, status) ~ 1, type = "kaplan-meier") records