Blog Archives

Times per second benchmark

March 5, 2013
By

In GNU R the simplest way to measure execution time of a piece code is to use system.time. However, sometimes I want to find out how many times some function can be executed in one second. This is especially useful when we want to compare function...

Read more »

Solving 9-puzzle with GNU R

January 4, 2013
By
Solving 9-puzzle with GNU R

During holiday break I have decided to solve 9-puzzle, which is 3x3 variant of a well known 15-puzzle. The solution has proven to be a nice application of igraph package. Warning: this time the code takes a bit more tame than usual in my...

Read more »

Wrapper functions in GNU R

December 26, 2012
By

Recently I have been working with GNU R optimization routines a lot. Function optim has a nice trace option that allows to monitor optimization progress. Another standard function optimize has no such feature but it is pos...

Read more »

Predictive models in R: a new book in Polish

December 14, 2012
By
Predictive models in R: a new book in Polish

Together with Mateusz Zawisza I have just published a new book in Polish on building predictive models in GNU R. It can be bought at Oficyna Wydawnicza SGH. The book presents complete examples of basic data mining processes.Although the book is in Poli...

Read more »

Bridge hand distribution: simulation vs exact calculation

December 8, 2012
By
Bridge hand distribution: simulation vs exact calculation

Recently I played bridge with my friends. Being frustrated with several consecutive poor hand distributions we asked ourselves a question what is the probability of having a hand good enough for a small slam. A well known rule of thumb is that you need...

Read more »

ESSA2013 Conference

November 24, 2012
By
ESSA2013 Conference

It has been just announced that during ESSA2013 conference I am planning to organize a special track on "Statistical analysis of simulation models". I hope to get some presentations using GNU R to promote it in social simulation community.It is obvious that GNU R excels in analysis of simulation data. However, very often it can be neatly...

Read more »

Possible error in Bayesian bootstrap

November 8, 2012
By
Possible error in Bayesian bootstrap

After my last post on Bayesian bootstrap I got a question why the sample from Dirichlet distribution is taken as weights for calculating mean in the procedure and not as weights used for sampling from the original data set. Actually this mistake i...

Read more »

Simple Bayesian bootstrap

November 2, 2012
By

Bootstrapping is a very popular statistical technique. However, its Bayesian analogue proposed by Rubin (1981) is not very common. I was looking for an example of its implementation in GNU R and could not find one so I decided to write a snippet presen...

Read more »

Plotting Watts-Strogatz model

September 21, 2012
By
Plotting Watts-Strogatz model

Recently I wanted to reproduce Figure 2 from Watts and Strogatz (1998). The task using igraph is simple but an interesting task was annotation of the resulting plot.Watts-Strogatz model generates graphs that have so called small-world ne...

Read more »

Simulation metamodeling with constraints

September 14, 2012
By
Simulation metamodeling with constraints

Last week I have posted about using simulation metamodeling to verify results of analytical solution of the model. After posting it I realized that the solution presented there can be improved by using knowledge of simulation model struc...

Read more »