ifejobi
2011-Dec-07 16:55 UTC
[R] survreg() provides same results with different distirbutions for left censored data
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 provide the same results: aft.gaussian <- summary(survreg(Surv(y,y>0),type="left")~ group),dist="gaussian") aft.weibull <- summary(survreg(Surv(y,y>0),type="left")~ group),dist="weibull") Thanks, Carmen -- View this message in context: http://r.789695.n4.nabble.com/survreg-provides-same-results-with-different-distirbutions-for-left-censored-data-tp4169671p4169671.html Sent from the R help mailing list archive at Nabble.com.
Thomas Lumley
2011-Dec-09 00:25 UTC
[R] survreg() provides same results with different distirbutions for left censored data
On Thu, Dec 8, 2011 at 3:55 AM, ifejobi <ifejobi at gmail.com> 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 > regardless of the assumed distribution. > > These two codes seem to provide the same results: > > aft.gaussian <- summary(survreg(Surv(y,y>0),type="left")~ > group),dist="gaussian") > > aft.weibull <- summary(survreg(Surv(y,y>0),type="left")~ > group),dist="weibull") >That's because you're fitting the same model: the dist= argument needs to be inside the parentheses for survreg(). -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland