Blog Archives

Fitting Generalized Regression Neural Network with Python

December 9, 2015
By
Fitting Generalized Regression Neural Network with Python

Read more »

Modeling Frequency in Operational Losses with Python

December 8, 2015
By
Modeling Frequency in Operational Losses with Python

Poisson and Negative Binomial regressions are two popular approaches to model frequency measures in the operational loss and can be implemented in Python with the statsmodels package as below: Although Quasi-Poisson regressions is not currently supported by the statsmodels package, we are still able to estimate the model with the rpy2 package by using R

Read more »

Modeling Severity in Operational Losses with Python

December 6, 2015
By
Modeling Severity in Operational Losses with Python

When modeling severity measurements in the operational loss with Generalized Linear Models, we might have a couple choices based on different distributional assumptions, including Gamma, Inverse Gaussian, and Lognormal. However, based on my observations from the empirical work, the differences in parameter estimates among these three popular candidates are rather immaterial from the practical standpoint.

Read more »

Estimating Quasi-Poisson Regression with GLIMMIX in SAS

October 14, 2015
By
Estimating Quasi-Poisson Regression with GLIMMIX in SAS

When modeling the frequency measure in the operational risk with regressions, most modelers often prefer Poisson or Negative Binomial regressions as best practices in the industry. However, as an alternative approach, Quasi-Poisson regression provides a more flexible model estimation routine with at least two benefits. First of all, Quasi-Poisson regression is able to address both

Read more »

Some Considerations of Modeling Severity in Operational Losses

August 16, 2015
By
Some Considerations of Modeling Severity in Operational Losses

In the Loss Distributional Approach (LDA) for Operational Risk models, multiple distributions, including Log Normal, Gamma, Burr, Pareto, and so on, can be considered candidates for the distribution of severity measures. However, the challenge remains in the stress testing exercise, e.g. CCAR, to relate operational losses to macro-economic scenarios denoted by a set of macro-economic

Read more »

Are These Losses from The Same Distribution?

June 14, 2015
By
Are These Losses from The Same Distribution?

In Advanced Measurement Approaches (AMA) for Operational Risk models, the bank needs to segment operational losses into homogeneous segments known as “Unit of Measures (UoM)”, which are often defined by the combination of lines of business (LOB) and Basel II event types. However, how do we support whether the losses in one UoM are statistically

Read more »

Granger Causality Test

May 25, 2015
By
Granger Causality Test

Read more »

Read A Block of Spreadsheet with R

May 10, 2015
By
Read A Block of Spreadsheet with R

In R, there are two ways to read a block of the spreadsheet, e.g. xlsx file, as the one shown below. The xlsx package provides the most intuitive interface with readColumns() function by explicitly defining the starting and the ending columns and rows. However, if we can define a named range for the block in

Read more »

To Difference or Not To Difference?

May 9, 2015
By
To Difference or Not To Difference?

In the textbook of time series analysis, we’ve been taught to difference the time series in order to have a stationary series, which can be justified by various plots and statistical tests. In the real-world time series analysis, things are not always as clear as shown in the textbook. For instance, although the ACF plot

Read more »

Modeling Count Time Series with tscount Package

March 31, 2015
By
Modeling Count Time Series with tscount Package

The example below shows how to estimate a simple univariate Poisson time series model with the tscount package. While the model estimation is straightforward and yeilds very similar parameter estimates to the ones generated with the acp package (https://statcompute.wordpress.com/2015/03/29/autoregressive-conditional-poisson-model-i), the prediction mechanism is a bit tricky. 1) For the in-sample and the 1-step-ahead predictions: yhat_

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)