[R] Weibull point process

Rolf Turner rolf.turner at xtra.co.nz
Thu Sep 15 12:12:54 CEST 2011


On 15/09/11 19:24, Torbjørn Ergon wrote:
> On Thu, 15 Sep 2011 09:47:35 +1200, Rolf Turner 
> <rolf.turner at xtra.co.nz> wrote:
>> On 15/09/11 07:21, Torbjørn Ergon wrote:
>>> Dear list,
>>>
>>> I'm looking for a function to generate (simulate) a random Weibull 
>>> point process. Can anyone help?
>>>
>>> Cheers,
>>>
>>> Torbjørn Ergon, University of Oslo
>>
>> Do you mean a renewal process with the inter-event times having
>> a Weibull distribution?  Should be trivial to code up, using rweibull.
>>
>>     cheers,
>>
>>         Rolf Turner
>
>
> Thanks for your reply!
>
> Yes, in a way - but the parameters of the Weibull must change after 
> each event. I'm trying to simulate events that can happen multiple 
> times thru the life of an individual and where the hazard rate is age 
> dependent according to a Weibull hazard. Hence, after the first event 
> has occurred at time t1 the hazard rate should be h(x; t1, 
> shape,scale) = (shape/scale)*((x-t1)/scale)^(shape-1). This doesn't 
> seem trivial to do using 'rweibull' - but perhaps I'm missing 
> something (trivial).

Unless I am terribly confused your hazard function is just the hazard 
function
of a Weibull distribution ``starting off'' from t1 rather than starting 
off from 0.
So a random variable having that hazard function would have the same 
distribution
as t1 + X where X is Weibull with the given shape and scale.

So you can just create the points of your process as the cumulative sum of
a number of independent Weibull variates.

Perhaps I'm not seeing things correctly.  If so, would some wiser person 
please chip in and
set me straight?

     cheers,

         Rolf Turner



More information about the R-help mailing list