[R] Beta stochastic simulation

Duncan Murdoch murdoch at stats.uwo.ca
Fri Sep 15 01:44:55 CEST 2006


On 9/14/2006 5:26 PM, Mark Pinkerton wrote:
> Hi Duncan,
> I had also validated the logic with a simple test which is why I was surprised by the differences I was seeing from tthe more complex simulation. I am running R on a Windows 2000 - I'll have to check which version at my desk tomorrow but it's pretty up to date, maybe 6 monthes old. Attached is a code snippet  from my simulation program which is used to estimate multi-event annual losses for US hurricanes. The event set being sampled from is quite large (~14000) with each event and account combination having a unique beta loss distribution. Simply swapping lines 23 and 24 has the effect on results that I mentioned in the previous email. The simulation is large enough that the MC error in the estimated means are negligible.

The code you sent isn't usable, because it's missing your data.  Could 
you please do the following?

  - verify that the behaviour still happens in the current alpha test 
version

  - try to simplify the example code so someone else can run it?  It 
could be that certain values of alpha and beta trigger a bug but the 
ones I tried were fine.

Duncan Murdoch



More information about the R-help mailing list