stat157 / background

0 stars 4 forks source link

Code from Luen #33

Open gnolnait opened 10 years ago

gnolnait commented 10 years ago

Hey guys I have received a response from Luen quoted below and he has provided us with R functions of the best algorithm to fit ETAS (EM), simulate ETAS, as well as sample code to generate an error diagram! Please let me know if we need anything else from him, or if we have any further inquiries to ask him.

Hi Disi, I don't know if any of the R packages fit ETAS using the method of Veen and Schoenberg (2009), which is the current best method. You might like to check if the methods give you stable results -- do changing the starting values give you very different parameter estimates?

Let me at least send you some files to play with:

https://www.dropbox.com/sh/r73o1lk3rs4koxx/W6pgLP0vG_

socal.dat: Contains a set of Southern California earthquake times and magnitudes. VS-functions.R: These are functions I got from Alejandro Veen to fit and simulate ETAS models. etas-training.R: My inefficient (for loops everywhere!), barely annotated code to draw error diagrams for the fit to the training set.

I also have a file to draw error diagrams for a test set but it has a comment saying "### THIS IS WRONG!" at the top so I should check that before giving that to you.

Best, ~brad.

alexchaomander commented 10 years ago

Thanks for sending this out Disi! Our group (The Quakers) will try to tackle the today when we meet up today

SunnySunnia commented 10 years ago

@gnolnait , Our group (The Quakers :p) have the ECDF plots ready in our repo: https://github.com/SunnySunnia/TheQuakers/tree/master/ECDF if your group still needs them.