Blog Archives

Tuning optim with parscale

January 26, 2014
By

I often get questions what is the use of parscale parameter in optim procedure in GNU R. Therefore I have decided to write a simple example showing its usage and importance. The function I test is a simplified version of estimation problem I had to sol...

Read more »

GNU R vs Julia: is it only a matter of devectorization?

December 28, 2013
By

Recently I have read a post on benefits of code devectorization in Julia. The examples given there inspired me to perform my own devectorization exercise. I decided to use bootstrapping as a test ground. The results are quite interesting (and not so ba...

Read more »

Speeding up model bootstrapping in GNU R

December 2, 2013
By

After my last post I have recurringly received two questions: (a) is it worthwhile to analyze GNU R speed in simulations and (b) how would simulation speed compare between GNU R and Python. In this post I want to address the former question and next ti...

Read more »

Simulation speed: GNU R vs Julia

November 23, 2013
By
Simulation speed: GNU R vs Julia

Recently there is a lot of noise about Julia. I have decided to test its speed in simulation tasks on my toy Cont model. I thought I had vectorized my GNU R code pretty well, but Julia is much faster.The model was described in my earlier posts so let u...

Read more »

Calibration of p-value under variable selection: an example

November 14, 2013
By
Calibration of p-value under variable selection: an example

Very often people report p-values for linear regression estimates after performing variable selection step. Here is a simple simulation that shows that such a procedure might lead to wrong calibration of such tests.Consider a simple data generating pro...

Read more »

Cont model – Part II

October 28, 2013
By
Cont model – Part II

In my last post I have investigated properties of Cont model (you can download the paper here). Today I would like to show how we can use simulations to further simplify its analysis.First let us start with the observation that the model does not reall...

Read more »

Cont model back after a year

October 16, 2013
By
Cont model back after a year

During ESSA2013 conference I had a discussion about Cont model I have commented a year ago.In original paper Cont highlights that his model produces distribution of returns characterized by positive excess kurtosis. In this post I want to investig...

Read more »

Visualizing optimization process

September 8, 2013
By
Visualizing optimization process

One of the approaches to graph drawing is application of so called force-directed algorithms. In its simplest form the idea is to layout the nodes on plane so that all edges in the graph have approximately equal length. This problem has very intuitive ...

Read more »

Genetic drift simulation

August 13, 2013
By
Genetic drift simulation

While preparing for the new teaching semester I have created an implementation of NetLogo GenDrift P local in GNU R.The model works as follows. Initially a square grid having side size is randomly populated with n types of agen...

Read more »

Testing function arguments in GNU R

June 28, 2013
By

Recently I have read a nice post on ensuring that proper arguments are passed to a function using GNU R class system. However, I often need a more lightweight solution to repetitive function argument testing.The alternative idea is to test function arg...

Read more »


Subscribe

Email:

  Subscribe