Re: [R] time varying covariates

From: David Barron <mothsailor_at_googlemail.com>
Date: Thu 14 Sep 2006 - 16:08:51 GMT

Have a look at the survSplit function in the survival package. It looks to me as though you could use survreg with the "weibull" option to achieve what you want. Otherwise, you'll have to rewrite the likelihood in terms of both start and end times.

On 14/09/06, Martin Wagner <martin.wagner@ilr.tu-berlin.de> wrote:

> Hello,

I am trying to model an intensity function with time-varying covariates. Before, I have successfully defined a log likelihood function for a Power-Law Process (lambda(t)=alpha*beta*t^(beta-1)) with two paramters and no covariates for a repairable systems with failure times (t). This function was maximized with R optim. No problem!

But now I want to include a covariate indicating a time-varying value at each failure time t. For constant covariates, the procedure is feasible :

leads to following log likelihood funciton:

here zi are the covariates which are constant for each unit i under observation. tij are the failure time for failure j of unit i.

Do you know how to formulate a log likelihood function for covariates which vary for each tj of each unit i ?

Thank you very much
Best regards

Martin Wagner
Berlin University of Technology



R-help@stat.math.ethz.ch 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.
-- 
=================================
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP


-- 
=================================
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch 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.
Received on Fri Sep 15 02:16:51 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 14 Sep 2006 - 16:42:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.