I agree with David that poisson regression would be the simplest thing. It's a consequence of the poison formulation and an exponential "trick" E(#breaks) = breaks per meter * length in meters = exp(Xb) * exp(log(length)) = exp(Xb + log(length))
X = covariates that affect "breaks per meter", b=coefficients log(length) appears as an offset, i.e., a covariate that has a known coefficient of 1. You could also use log(length) as an offset in a Cox model, for the same logic. relative risk that a given pipe breaks = length * risk per meter = exp(Xb + log(length)) You need to decide if such a model is scientifically defensible, e.g., if this involved flexing I would expect breakage to go up faster than linear. Notes: offset has always been a part of coxph and survreg, time to improve the documentation I guess I forgot to include the context in my first reply. Terry T. On Tue, 2011-09-06 at 12:19 -0400, David Winsemius wrote: > I think you are replying to Dr Therneau without including this context: > >> --- begin---- > >> Survreg produces MLE estimates. > >> > >> For your second question, don't know what you are asking. Can you be > >> more specific and detailed? > >> > >> ---begin included message -- > >> Do you know if the parameters estimators are MLE estimators? > >> > >> One more question: > >> In my case study I have failures that occured on different objects > >> that > >> have different age and length, could I use weight to find the > >> estimates of a > >> weibull law and so to find the probabilty of failure per unit of > >> length > >> for example? > -----end--------- > > On Sep 6, 2011, at 9:50 AM, Boris Beranger wrote: > > > Sorry when we talk about about MLE estimates does that mean WLE?I am > > trying > > to understand if the survreg function is allowing a weight for each > > density > > function when calculating the likelihood. > > > > In my second question I was trying to explain that my problem is > > that I have > > pipes of different length and I want to know their probability to > > break per > > metre. My idea was to weight each of my observations to get estimate > > probabilities per metre.Does that sound realistic? > > I have generally used Poisson regression [ glm(..., > family="poisson") ] in that situation. It lets you do two things: a) > apply weighting by using offset=log(length_of_pipe) and b) model > multiple breaks in a pipe if such an occurrence is possible. (It also > produces an MLE estimate if that feature is of some special importance.) > > I respectfully defer to anything Dr Therneau says on this matter and > am only really posting in hopes that he will clarify whether there is > any value in thinking about the use of offset terms in either > parametric or Cox survival models. > > There is an offset argument in glm but I do not see one (any longer?) > in survreg or coxph. I have what must be an extremely vague memory of > seeing an offset term in coxph formulas, but I do not see such a > possibility described in the current help pages. Therenau and Grambsch > indicates that CPH models with certain forms of frailty are similar to > models with offsets but the help apge for `Surv` specifically warns > against the use of "gamma/ml or gaussian/reml [frailty terms] with > survreg". > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.