Here you will find daily news and tutorials about R, contributed by over 573 bloggers.
There are many ways to follow us - By e-mail:On Facebook: If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

I wanted to have an idea of the general form of the forward curve for London ICE gasoil futures contracts along the year. The R code below plot a forward curve for each month throughout the time series. Data were … Continue reading →

In this short post, we give the code snippets for both the least-square method (LS) and the maximum likelihood estimation (MLE). They are based on Calibrating the Ornstein-Uhlenbeck (Vasicek) model at www.sitmo.com. One can also read the article On the Simulation and Estimation … Continue reading →

The forward (explicit) Euler method is a first-order numerical procedure for solving ODEs with a given initial value. The forward Euler method is said to be the simplest and most obvious numerical ODEs integrator. In fact, the simulation using the forward Euler only … Continue reading →

Exercise: Plot a bivariate normal distribution for simulated data, , and . As explained on Mathworld, the bivariate normal distribution is the statistical distribution with probability density function: where: and, with ‘real’ data: Here, we will impose . We are free to … Continue reading →

Today, we write a small piece of C/C++ code that implements the well-known Newton-Raphson algorithm (see, Mathworld). We also provide the R code. Exercise: Find the unique root of the function using the Newton-Raphson method. Notice that we choose a function … Continue reading →

Below, we give the R code to plot the PDF and the CDF for normal distributions. We wish to get charts quite similar to the ones read on Wikipedia (Normal Distribution). The resulting charts are shown at the bottom. Notice that … Continue reading →

This quick blog entry to share an excellent article of Thijs van den Berg entitled Generating Correlated Random Numbers. This author describes in a nicely way how to generate sequences of correlated random numbers using the Cholesky decomposition, and a Eigenvector … Continue reading →