Re: [R] survreg FUNCTION

2015-04-08 Thread peter dalgaard
On 08 Apr 2015, at 10:14 , CHIRIBOGA Xavier wrote: > Dear members, > > > > I am trying a survival analysis , I got: > > > > Error: could not find function "survreg" > > > > I already load > > the packages: survival > > the function: splines > Load or install? I suspect you actually

[R] survreg FUNCTION

2015-04-08 Thread CHIRIBOGA Xavier
Dear members, I am trying a survival analysis , I got: Error: could not find function "survreg" I already load the packages: survival the function: splines What can I do? Thanks for you help, Xavier __ R-help@r-project.org mailing lis

Re: [R] survreg and predict probability of failure

2014-03-17 Thread Therneau, Terry M., Ph.D.
-- begin included message --- Hi, I am fitting a weibull model as follows my models is s <- Surv(DFBR$Time,DFBR$Censor) wei <- survreg(s~Group+UsefulLife,data = DFBR,dist="weibull") How can i predict the probabilty of failure in next 10 days, for a new data with group =10 and usefuleLife =10

Re: [R] survreg and predict probability of failure

2014-03-14 Thread David Winsemius
Perhaps: G10 <- predict(wei, list(Group =10 , UsefulLife =10), type="response") You should get a single km-type object and will need to extract a time-specific value. (You really _should_ post what you have tried.) -- David Sent from my iPhone Sent from my iPhone > On Mar 14, 2014, at 9:11

Re: [R] survreg and predict probability of failure

2014-03-14 Thread David Winsemius
Perhaps: G10 <- predict(wei, list(Group =10 , UsefulLife =10), type="response") You should get a single km-type object and will need to extract a time-specific value. (You really _should_ post what you have tried.) -- David Sent from my iPhone > On Mar 14, 2014, at 7:11 PM, shilpi harpavat

Re: [R] survreg and predict probability of failure

2014-03-14 Thread David Winsemius
Perhaps: G10 <- predict(wei, list(Group =10 , UsefulLife =10), type="response") You should get a single km-type object and will need to extract a time-specific value. (You really _should_ post what you have tried.) -- David Sent from my iPhone > On Mar 14, 2014, at 7:11 PM, shilpi harpavat

[R] survreg and predict probability of failure

2014-03-14 Thread shilpi harpavat
Hi, I am fitting a weibull model as follows my models is s <- Surv(DFBR$Time,DFBR$Censor) wei <- survreg(s~Group+UsefulLife,data = DFBR,dist="weibull") How can i predict the probabilty of failure in next 10 days, for a new data with group =10 and usefuleLife =100 Thx shilpi

Re: [R] survreg with measurement uncertainties

2013-06-14 Thread Kyle Penner
ents: > model > 2.606 > > > -Original Message- > From: Kyle Penner [mailto:kpen...@as.arizona.edu] > Sent: Wednesday, June 12, 2013 3:49 PM > To: Terry Therneau > Cc: r-help@r-project.org > Subject: Re: [R] survreg with measurement uncertainties > > Hi Terry

Re: [R] survreg with measurement uncertainties

2013-06-13 Thread Andrews, Chris
e standard linear model call: lm(data ~ model - 1, weights = 1/err^2) Call: lm(formula = data ~ model - 1, weights = 1/err^2) Coefficients: model 2.606 -Original Message- From: Kyle Penner [mailto:kpen...@as.arizona.edu] Sent: Wednesday, June 12, 2013 3:49 PM To: Terry Therneau Cc

Re: [R] survreg with measurement uncertainties

2013-06-12 Thread Kyle Penner
Hi Terry, Thanks for your quick reply. I am talking about uncertainty in the response. I have 2 follow up questions: 1) my understanding from the documentation is that 'id' in cluster(id) should be the same when the predictors are not independent. Is this correct? (To be more concrete: my dat

Re: [R] survreg with measurement uncertainties

2013-06-12 Thread Terry Therneau
I will assume that you are talking about uncertainty in the response. Then one simple way to fit the model is to use case weights that are proprional to 1/variance, along with +cluster(id) in the model statement to get a correct variance for this case. In linear models this would be called the

Re: [R] survreg with measurement uncertainties

2013-06-12 Thread Andrews, Chris
survreg allows interval censored data, if that is how you want to represent measurement uncertainty. See ?Surv -Original Message- From: Kyle Penner [mailto:kpen...@as.arizona.edu] Sent: Tuesday, June 11, 2013 8:02 PM To: r-help@r-project.org Subject: [R] survreg with measurement

[R] survreg with measurement uncertainties

2013-06-11 Thread Kyle Penner
Hello, I have some measurements that I am trying to fit a model to. I also have uncertainties for these measurements. Some of the measurements are not well detected, so I'd like to use a limit instead of the actual measurement. (I am always dealing with upper limits, i.e. left censored data.)

[R] Survreg Problem

2012-11-29 Thread Lumar
Hello community, I have a problem with my survreg function in R-Statistics. My created code is the following: library(survival) surv=Surv(IPT_IN_DAYS,Status) survival.data.weibull=survreg(surv~AGE_DAYS+KM_COUNT+LL_PER_DAY+IPT_HIS+IPT_SDEV, data=spss, dist="weibull", scale=2.0) summary(surviva

Re: [R] survreg & gompertz

2012-11-16 Thread Terry Therneau
The short answer is "sort of". Medium is that survreg implements the model framework found in Kalbfeisch and Prentice, The statistical analysis of failure time data, chapter, chapter 2.2. The ime variable T has f(time) ~ X' beta + sigma * W where W is an error term from some distribution an

Re: [R] survreg & gompertz

2012-11-16 Thread Matthias Ziehm
On 15/11/12 21:22, David Winsemius wrote: On Nov 15, 2012, at 5:38 AM, Matthias Ziehm wrote: Hi all, Sorry if this has been answered already, but I couldn't find it in the archives or general internet. A Markmail/Rhelp search on: gompertz survreg ...brings this link to a reply by Terry T

Re: [R] survreg & gompertz

2012-11-15 Thread David Winsemius
On Nov 15, 2012, at 5:38 AM, Matthias Ziehm wrote: > Hi all, > > Sorry if this has been answered already, but I couldn't find it in the > archives or general internet. A Markmail/Rhelp search on: gompertz survreg ...brings this link to a reply by Terry Therneau. Seems to address everything

[R] survreg & gompertz

2012-11-15 Thread Matthias Ziehm
Hi all, Sorry if this has been answered already, but I couldn't find it in the archives or general internet. Is it possible to implement the gompertz distribution as survreg.distribution to use with survreg of the survival library? I haven't found anything and recent attempts from my side wer

[R] SURVREG Function

2012-09-27 Thread Francesca Meucci
Hi, I need some help to manage frailty in Survreg function; in particular I'm looking for more information about frailty in survreg function applied to a loglogistic hazard function. Actually I need to develope a predictor for frailty random variable realization (similar to the Proportional Haz

Re: [R] Survreg

2012-04-23 Thread Terry Therneau
On 04/22/2012 05:00 AM, r-help-requ...@r-project.org wrote: I am trying to run Weibull PH model in R. Assume in the data set I have x1 a continuous variable and x2 a categorical variable with two classes (0= sick and 1= healthy). I fit the model in the following way. Test=survreg(Surv(t

[R] Survreg

2012-04-21 Thread Val
Hi all, I am trying to run Weibull PH model in R. Assume in the data set I have x1 a continuous variable and x2 a categorical variable with two classes (0= sick and 1= healthy). I fit the model in the following way. Test=survreg(Surv(time,cens)~ x1+x2,dist="weibull") My questions are 1.

Re: [R] Survreg output - interpretation

2012-04-12 Thread mariaeugeniau
Dear Terry  here is the survreg line from which I understand that "gender" is significant survreg(formula = Surv(dias, status) ~ trat * sexo * rep, dist = "weibull")                    Value      Std. Error       z        p sexom            -0.2187

Re: [R] Survreg output - interpretation

2012-04-12 Thread Terry Therneau
--- begin included message --- Hello R users, I am analizing survival data (mostly uncensored) and want to extract the most out of it. Since I have more than one factor, I?ve read that the survival regression can help to test the interactions between factors, and then decide how to do the comparis

[R] Survreg output - interpretation

2012-04-11 Thread mariaeugeniau
Hello R users, I am analizing survival data (mostly uncensored) and want to extract the most out of it. Since I have more than one factor, I´ve read that the survival regression can help to test the interactions between factors, and then decide how to do the comparisons using the Log-rank test (sur

Re: [R] survreg() provides same results with different distirbutions for left censored data

2011-12-08 Thread Thomas Lumley
On Thu, Dec 8, 2011 at 3:55 AM, ifejobi wrote: > Hello, > > I'm working with some left censored survival data using accelerated failure > time models.  I am interested in fitting different distributions to the data > but seem to be getting the same results from the model fit using survreg > regard

[R] survreg() provides same results with different distirbutions for left censored data

2011-12-07 Thread ifejobi
Hello, I'm working with some left censored survival data using accelerated failure time models. I am interested in fitting different distributions to the data but seem to be getting the same results from the model fit using survreg regardless of the assumed distribution. These two codes seem to

Re: [R] Survreg object

2011-05-16 Thread Terry Therneau
-:begin inclusion --- There can be some risk in creating your own extraction methods, since the author of a package may have had reasons for not making it available, but in this case he did offer a table that includes the --end --- You are reading too deeply. When survreg was written 20+ y

Re: [R] Survreg object

2011-05-14 Thread Prof Brian Ripley
There is however the generic vcov(), which has a method for class "survreg". One good reason for not having a simple means to extract standard errors is that considering coefficients in isolation is often unwise (and has come up on R-help more than once already this month). The summary() met

Re: [R] Survreg object

2011-05-14 Thread David Winsemius
On May 14, 2011, at 5:48 AM, andre bedon wrote: Hi,Just a quick one, does anyone know the command for accessing the standard errors from a survreg object? I can access the coefficients by model$coefficients, but I cant seem to find a command to access the errors. Any help would be greatl

[R] Survreg object

2011-05-14 Thread andre bedon
Hi,Just a quick one, does anyone know the command for accessing the standard errors from a survreg object? I can access the coefficients by model$coefficients, but I cant seem to find a command to access the errors. Any help would be greatly appreciated.Regards,Andre

Re: [R] survreg 3-way interaction

2011-01-28 Thread tdenes
The fire devoured my laptop, but the PC is still working... :) Sorry for the lazyness, you are totally right. Here goes a reproducible example, which resembles the main features of our dataset: # three experimental factors, 30 subjects expgrid <- expand.grid(F1=0:1,F2=0:1,F3=0:1,id=1:30) # set

Re: [R] survreg 3-way interaction

2011-01-28 Thread Terry Therneau
> I was wondering why survreg (in survival package) can not handle > three-way interactions. I have an AFT . You have given us no data to diagnose your problem. What do you mean by "cannot handle" -- does the package print a message "no 3 way interactions", gives wrong answers, your laptop

[R] survreg 3-way interaction

2011-01-28 Thread tdenes
Dear All, I was wondering why survreg (in survival package) can not handle three-way interactions. I have an AFT (accelerated failure time) model with a frailty term. If the model is restricted to two-way interactions, survreg and gamlss.cens (with random() term) give very similar results, except

Re: [R] survreg vs. aftreg (eha) - the relationship between fitted coefficients?

2011-01-15 Thread Andrew Jackson
Dear Göran I too have been working on this for the last couple of weeks and this is a great help thanks. I wonder can you advise on how the covariance matrix of estimated parameters in phreg relates to those estimated in survreg. Im hoping you can just put your finger on this. Your eha package

Re: [R] survreg vs. aftreg (eha) - the relationship between fitted coefficients?

2010-12-14 Thread Göran Broström
On Fri, Dec 10, 2010 at 5:21 PM, Eleni Rapsomaniki wrote: > Dear R-users, > > I need to use the aftreg function in package 'eha' to estimate failure times > for left truncated survival data. Be careful! This is only possible under strong assumptions about the (unobserved) covariate vector. This

[R] survreg vs. aftreg (eha) - the relationship between fitted coefficients?

2010-12-10 Thread Eleni Rapsomaniki
Dear R-users, I need to use the aftreg function in package 'eha' to estimate failure times for left truncated survival data. Apparently, survreg still cannot fit such models. Both functions should be fitting the accelerated failure time (Weibull) model. However, as Göran Broström points out in

Re: [R] Survreg function for loglogistic hazard estimation

2010-03-19 Thread akeras
I a trying to use survreg to fit a Weibull distribution. From the last few messages I understand how to interpret the parameters. However, how do I get the covariance of lambda and alpha? Is there a predict command for that? Thanks -- View this message in context: http://n4.nabble.com/Survreg-f

Re: [R] survreg function in survival package

2009-11-16 Thread carol white
both scale and shape parameters. Sorry, just forgot to reply to all when replying to your email. Unfortunately, nobody else has replied yet so I wonder if anybody else could be helpful. Cheers, --- On Sat, 11/14/09, David Winsemius wrote: > From: David Winsemius > Subject: Re:

Re: [R] survreg function in survival package

2009-11-13 Thread David Winsemius
On Nov 13, 2009, at 3:17 AM, carol white wrote: Hi, Is it normal to get intercept in the list of covariates in the output of survreg function with standard error, z, p.value etc? Does it mean that intercept was fitted with the covariates? Does Value column represent coefficients or some t

[R] survreg function in survival package

2009-11-13 Thread carol white
Hi, Is it normal to get intercept in the list of covariates in the output of survreg function with standard error, z, p.value etc? Does it mean that intercept was fitted with the covariates? Does Value column represent coefficients or some thing else? Regards, -

[R] Survreg function + deviation

2009-09-12 Thread Felipe
I am trying to estimate by MLE weibull coefficients and deviation. But how can i estimate deviation? I tried to find at the list and at the internet this but couldn't make it. Anyone could help me on this? Thanks. [[alternative HTML version deleted]]

Re: [R] Survreg function for loglogistic hazard estimation

2009-06-08 Thread chenjiakai
Dear Terry, Thanks a lot for your reply. The result of survreg reads like: Call: survreg(formula = Surv(end, status) ~ fico_demean, data = raw, dist = "loglogistic", model = TRUE) Value Std. Error z p (Intercept) 2.98365 1.34e-03 2233.2 0.00e+00 fico_demean

Re: [R] Survreg function for loglogistic hazard estimation

2009-06-08 Thread Terry Therneau
---begin included message -- I am trying to use R to do loglogistic hazard estimation. My plan is to generate a loglogistic hazard sample data and then use survreg to estimate it. If everything is correct, survreg should return the parameters I have used to generate the sample data. I have w

[R] Survreg function for loglogistic hazard estimation

2009-06-06 Thread chenjiakai
I am trying to use R to do loglogistic hazard estimation. My plan is to generate a loglogistic hazard sample data and then use survreg to estimate it. If everything is correct, survreg should return the parameters I have used to generate the sample data. I have written the following code to d

Re: [R] Survreg/psm output

2009-04-16 Thread Frank E Harrell Jr
Laura Bonnett wrote: Dear R-listers, I know that there have been many, many posts on the output from Survreg. To summarise what I have read, Scale is 1/shape of the Weibull which is also the standard deviation of the normal distribution which is also the standard deviation of the log survival t

[R] Survreg/psm output

2009-04-16 Thread Laura Bonnett
Dear R-listers, I know that there have been many, many posts on the output from Survreg. To summarise what I have read, Scale is 1/shape of the Weibull which is also the standard deviation of the normal distribution which is also the standard deviation of the log survival time and Intercept is lo

Re: [R] Survreg and censored observations

2009-04-15 Thread Frank E Harrell Jr
David S. Schwarz wrote: How does one indicate that a particular survival time is right censored in the Survreg routine? Read the documentation? :-) -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt Universit

[R] Survreg and censored observations

2009-04-15 Thread David S. Schwarz
How does one indicate that a particular survival time is right censored in the Survreg routine? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gu

Re: [R] survreg help in R

2009-03-09 Thread Terry Therneau
> survreg(Surv(times,censor),dist='weibull') Error in x$terms : $ operator is invalid for atomic vectors You need a right-hand side for the formula survreg(Surv(times, censor) ~1, dist='weibull') In your code the first argument was not recognized as a "formula", and the program

Re: [R] survreg help in R

2009-03-08 Thread David Winsemius
I think R and survival took a look at what you provided for a formula to survreg and rejected it because it had no lh-rh separator, "~", and thus no rh terms. Turns out that it also expects a dataframe even if both terms for the Surv function are already given and there is nothing further t

[R] survreg help in R

2009-03-08 Thread murphy82nd
Hey all, I am trying to use the survreg function in R to estimate the mean and standard deviation to come up with the MLE of alpha and lambda for the weibull distribution. I am doing the following: times<-c(10,13,18,19,23,30,36,38,54,56,59,75,93,97,104,107,107,107) censor<-c(1,0,0,1,0,1,1,0,0,0,1

Re: [R] survreg and pweibull solved for any distribution

2008-11-27 Thread Andrew Beckerman
Dear all - Following up my own post, having found a Terry Therneau post about the value of predict(model,type="quantile"), http://tolstoy.newcastle.edu.au/R/e4/help/08/03/5335.html the following code ammendment produces what I was intending to see. It clear that the 0.5 quantile is the in

[R] survreg and pweibull

2008-11-26 Thread Andrew Beckerman
Dear all - I have followed the thread the reply to which was lead by Thomas Lumley about using pweibull to generate fitted survival curves for survreg models. http://tolstoy.newcastle.edu.au/R/help/04/11/7766.html Using the lung data set, data(lung) lung.wbs <- survreg( Surv(time, status)

Re: [R] survreg with frailty

2008-04-18 Thread Terry Therneau
The combination of survreg + gamma frailty = invalid model, i.e., the example that you quote. I did not realize that this had been added to the survreg help file until very recently. I will try to fix the oversight. Other, more detailed documentation states that Gaussian frailty + AIC

Re: [R] survreg() with frailty

2008-04-17 Thread Prof Brian Ripley
On Thu, 17 Apr 2008, Dimitris Rizopoulos wrote: > Dear R-users, > > I have noticed small discrepencies in the reported estimate of the > variance of the frailty by the print method for survreg() and the > 'theta' component included in the object fit: This is the print method for class "survreg.pe

[R] survreg() with frailty

2008-04-17 Thread Dimitris Rizopoulos
Dear R-users, I have noticed small discrepencies in the reported estimate of the variance of the frailty by the print method for survreg() and the 'theta' component included in the object fit: # Examples in R-2.6.2 for Windows library(survival) # version 2.34-1 (2008-03-31) # discrepancy fit1

Re: [R] survreg asking for parameter "special"

2008-03-10 Thread Daniel Malter
endet: Monday, March 10, 2008 8:57 PM An: r-help@r-project.org Betreff: [R] survreg asking for parameter "special" Hello Gurus: I'm using basic survival analysis, and trying to use survreg, and I provided the parameter formula= and data=, but I got an error saying: Error in t

[R] survreg asking for parameter "special"

2008-03-10 Thread Chang Liu
Hello Gurus: I'm using basic survival analysis, and trying to use survreg, and I provided the parameter formula= and data=, but I got an error saying: Error in terms.default(formula, special, data = data) : no terms component I'm wondering what it's trying to say. Is it because I did

[R] survreg and cluster and frailty

2008-01-04 Thread Andrew Beckerman
Dear All - Any help/advice appreciated OSX 10.5.1, R 2.6.1, survival 2.34 I am trying to fit an interval censored model with cluster or frailty term (first 20 lines of the data set are below). ---MODEL m1<-survreg(Surv(start,stop,event,type="interval")~tree+hag+entcir +depth+

Re: [R] Survreg(), Surv() and interval-censored data

2007-11-29 Thread Terry Therneau
The question (slightly rephrased) was Why does survreg(Surv(T.1, T.2, type='interval2') ~1, data=x) fail, when x is T.1 T.2 Status 1 0.000 0.62873036 1 2 0.000 2.07039068 1 3 0.000 1.40297214 1 4 0.000 0.09112871 1 5 0.

Re: [R] Survreg(), Surv() and interval-censored data

2007-11-28 Thread Mohammad Ehsanul Karim
0 28 1.6855216 999. 0 29 1.7934033 999. 0 Thanks in advance. Ehsan Re: [R] Survreg(), Surv() and interval-censored data This message: [ Message body ] [ More options ] Related messages: [ Next message ] [ Previous message ] [ In reply to ] [ Re: [R] Survreg(),