Model Calibration with Open Source Software: R and Friends. Dr. Heiko Frings Mathematical Risk Consulting



Similar documents
Bayesian Machine Learning (ML): Modeling And Inference in Big Data. Zhuhua Cai Google, Rice University

Model-based Synthesis. Tony O Hagan

R2MLwiN Using the multilevel modelling software package MLwiN from R

Bayesian Methods for the Social and Behavioral Sciences

Tutorial on Markov Chain Monte Carlo

Using SAS PROC MCMC to Estimate and Evaluate Item Response Theory Models

Validation of Software for Bayesian Models using Posterior Quantiles. Samantha R. Cook Andrew Gelman Donald B. Rubin DRAFT

Introduction to Markov Chain Monte Carlo

An Introduction to Using WinBUGS for Cost-Effectiveness Analyses in Health Economics

Gaussian Processes to Speed up Hamiltonian Monte Carlo

Service courses for graduate students in degree programs other than the MS or PhD programs in Biostatistics.

Analysis of Financial Time Series

STAT3016 Introduction to Bayesian Data Analysis

ECON 424/CFRM 462 Introduction to Computational Finance and Financial Econometrics

Why is SAS/OR important? For whom is SAS/OR designed?

Lecture/Recitation Topic SMA 5303 L1 Sampling and statistical distributions

THE USE OF STATISTICAL DISTRIBUTIONS TO MODEL CLAIMS IN MOTOR INSURANCE

Validation of Software for Bayesian Models Using Posterior Quantiles

Statistics Graduate Courses

PREDICTIVE DISTRIBUTIONS OF OUTSTANDING LIABILITIES IN GENERAL INSURANCE

11. Time series and dynamic linear models


Bayesian networks - Time-series models - Apache Spark & Scala

APPLIED MISSING DATA ANALYSIS

BAYESIAN ANALYSIS OF AN AGGREGATE CLAIM MODEL USING VARIOUS LOSS DISTRIBUTIONS. by Claire Dudley

Bayesian Statistics in One Hour. Patrick Lam

Statistics in Applications III. Distribution Theory and Inference

Imputing Values to Missing Data

Bayesian Phylogeny and Measures of Branch Support

STA 4273H: Statistical Machine Learning

AN INTRODUCTION TO MARKOV CHAIN MONTE CARLO METHODS AND THEIR ACTUARIAL APPLICATIONS. Department of Mathematics and Statistics University of Calgary

Parallelization Strategies for Multicore Data Analysis

Imputing Missing Data using SAS

A Two-Stage Bayesian Model for Predicting Winners in Major League Baseball

Dirichlet Processes A gentle tutorial

Modeling and Analysis of Call Center Arrival Data: A Bayesian Approach

Generalized linear models and software for network meta-analysis

PS 271B: Quantitative Methods II. Lecture Notes

MCMC-Based Assessment of the Error Characteristics of a Surface-Based Combined Radar - Passive Microwave Cloud Property Retrieval

A Bayesian Model to Enhance Domestic Energy Consumption Forecast

Markov Chain Monte Carlo and Applied Bayesian Statistics: a short course Chris Holmes Professor of Biostatistics Oxford Centre for Gene Function

Parameter estimation for nonlinear models: Numerical approaches to solving the inverse problem. Lecture 12 04/08/2008. Sven Zenker

Model Selection and Claim Frequency for Workers Compensation Insurance

SAS Certificate Applied Statistics and SAS Programming

CHAPTER 3 EXAMPLES: REGRESSION AND PATH ANALYSIS

Multivariate Normal Distribution

Handling attrition and non-response in longitudinal data

Making Good Use of Data at Hand: Government Data Projects. Mark C. Cooke, Ph.D. Tax Management Associates, Inc.

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS Instructor: Michael Gelbart

Government of Russian Federation. Faculty of Computer Science School of Data Analysis and Artificial Intelligence

Microclustering: When the Cluster Sizes Grow Sublinearly with the Size of the Data Set

Bayesian Statistics: Indian Buffet Process

SPPH 501 Analysis of Longitudinal & Correlated Data September, 2012

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMS091)

A Bayesian Antidote Against Strategy Sprawl

Markov Chain Monte Carlo Simulation Made Simple

Statistics for BIG data

BayesX - Software for Bayesian Inference in Structured Additive Regression

Web-based Supplementary Materials for Bayesian Effect Estimation. Accounting for Adjustment Uncertainty by Chi Wang, Giovanni

Monte Carlo Methods and Models in Finance and Insurance

Faculty of Science School of Mathematics and Statistics

How To Understand The Theory Of Probability

Learning outcomes. Knowledge and understanding. Competence and skills

Statistics & Probability PhD Research. 15th November 2014

Big Data need Big Model 1/44

one Introduction chapter OVERVIEW CHAPTER

Simulation and Lean Six Sigma

Information Visualization WS 2013/14 11 Visual Analytics

A Hybrid Modeling Platform to meet Basel II Requirements in Banking Jeffery Morrision, SunTrust Bank, Inc.

Latency in High Performance Trading Systems Feb 2010

Analytics on Big Data

Estimation of Fractal Dimension: Numerical Experiments and Software

Better planning and forecasting with IBM Predictive Analytics

STATISTICA Solutions for Financial Risk Management Management and Validated Compliance Solutions for the Banking Industry (Basel II)

ANALYTICS IN BIG DATA ERA

Journal of Statistical Software

Software Review: ITSM 2000 Professional Version 6.0.

Spatial Statistics Chapter 3 Basics of areal data and areal data modeling

INTRODUCTION TO DATA MINING SAS ENTERPRISE MINER

The HB. How Bayesian methods have changed the face of marketing research. Summer 2004

Scaling Bayesian Network Parameter Learning with Expectation Maximization using MapReduce

Basic Bayesian Methods

Psychology 209. Longitudinal Data Analysis and Bayesian Extensions Fall 2012

Program description for the Master s Degree Program in Mathematics and Finance

Software and Hardware Solutions for Accurate Data and Profitable Operations. Miguel J. Donald J. Chmielewski Contributor. DuyQuang Nguyen Tanth

SAS Software to Fit the Generalized Linear Model

DURATION ANALYSIS OF FLEET DYNAMICS

Transcription:

Model with Open Source Software: and Friends Dr. Heiko Frings Mathematical isk Consulting Bern, 01.09.2011

Agenda in a Friends Model with & Friends o o o Overview First instance: An Extreme Value Example Second instance: Gibbs Sampling with WinBUGS 2

3

Friends Model Instance 1 Instance 2 in a is an integrated frame of open source software (GNU) for effective data handling and data storage calculations on arrays statistical data analysis sophisticated graphical display object oriented programming language is used by thousands of people, worldwide and from a all kind of disciplines. Among them: Biostatistics, Medical Science, Geostatistics, Meteorology, Finance. 4

Friends Model Instance 1 Instance 2 in a / Some History The syntax of is very similar to S. S his hand, was initiated in 1976 as an internal statistical analysis environment. Version 4 the version we use today- of S language was released in 1998. Insightful and since 2008 TIBCO sells its implementation of the S language under the product name S-PLUS. The future of S-PLUS is uncertain. In 1991 oss Ihaka and obert Gentleman created. In 1993 there was the first announcement of to the public. Since 1995 is a free software under the GNU General Public License. The Core Group which controls the source code of was formed in 1997. 5

6

Friends Model Instance 1 Instance 2 There are thousands of additional packages available. Some of the most important ones from a model calibration point of view are shown on the next slide. This overview is by far not complete and the choice is (unavoidable) somewhat subjective. 7

Friends Model Instance 1 Instance 2 8

Friends Model Instance 1 Instance 2 9

Friends 10

Friends Model Example 1 Example 2 GUIS In terms of a user friendly GUI comes very naked. But, meanwhile there is a range of quite useful and free of charge available GUIS Commander Studio Various packages for creating simple GUIS are available. Nacked GUI Screenshot from Commander Screenshot from Studio 11

Friends Model Example 1 Example 2 (-) Workflows Analytic Flow ed KNIME. 12

Friends Model Instance 1 Instance 2 WinBUGS The BUGS (Bayesian Inference Using Gibbs Sampling) project is concerned with flexible software for the Bayesian analysis of complex statistical models using Markov Chain Monte Carlo (MCMC) methods. The project began in 1989 in the MC Biostatistics Unit and led initially to the `Classic' BUGS program, and then onto the WinBUGS software developed jointly with the Imperial College School of Medicine at St Mary's, London. The 2WinBUGS package provides convenient method to call WinBUGS from. Coda package: Output analysis and diagnostics for MCMC 13

Friends Model Instance 1 Instance 2 Some Interfaces Combining with L A T E X: SWEAVE Communication between and Excel: and Word: Excel Word Interface with KNIME Interface with the editor Tinn 14

Model 15

Friends Model Instance 1 Instance 2 Some Important functions for Purposes optim{stats} General-purpose optimization based on Nelder Mead, quasi-newton and conjugate-gradient algorithms. mle {stats4} Estimate parameters by the method of maximum likelihood. mle is a wrapper around optim mle2 {bbmle} Improved version of mle fitdist {fitdistrplus} Convenient function to fit univariate distributions 16

Friends Model Example 1 Example 2 An Extreme Value Example Data input: simple vector of loss data Some Explorative Statistics Decide on a treshhold using an Me Plot / Hill Plot Fit a GPD Test quality of fit un some simulations 17

Friends Model Example 1 Example 2 An Extreme Value Example 18

Friends Model Example 1 Example 2 An Extreme Value Example 19

Friends Model Instance 1 Instance 2 Gibbs Sampling with WinBUGS Gibbs sampling is an algorithm to generate a sequence of samples from the joint probability distribution of two or more random variables. It is one of the simplest Markov chain Monte Carlo algorithms. The algorithm is named after the physicist J. W. Gibbs, in reference to an analogy between the sampling algorithm and statistical physics. Geman and Geman 1984, Gelfand and Smith 1990. WinBUGS is a specialized software to run the Gibbs Sampler on hirarchical model structures. David P.M Scollnick described various actuarial application of WinBUGS. 20

Friends Model Instance 1 Instance 2 Gibbs Sampling with WinBUGS Specify an initial value X = (X 0 1 X 0 2, X 0 3..,X 0 k ) epeat for j = 0,,n Sample X j+1 1 from ψ(x 1 X j 2, X j 3..,X j k ) Sample X j+1 2 from ψ(x 2 X j+1 1, X j 3,..,X j k ) Sample X j+1 k from ψ(x p X j+1 1, X j+1 3,..,X j+1 k-1 )... 21

Friends Model Instance 1 Instance 2 Gibbs Sampling with WinBUGS Gibbs sampling algorithm in two dimensions starting from an initial point and then completing three iterations 2 3 1 0 22

Friends Model Instance 1 Instance 2 Fit Loss Severity in WinBUGS There are to enable the communication between and WinBUGS: 2WinBUGS, Brugs, coda. Let s have a look at this simple example inside the software..

Use! 24