October 2013

An introduction to Econometrics, using R

October 22, 2013 | David Smith

If your econometrics is a bit rusty and you're also looking to learn the R language, you can kill two birds with one stone with Introductory Econometrics using Quandl and R. The first three parts of this seven-part tutorial introduces the basics of regression analysis, while the remaining sections provide ... [Read more...]

An OpenBLAS-based Rblas for Windows 64

October 22, 2013 | Avraham Adler

One of the more important pieces of software that powers R is its BLAS, which stands for Basic Linear Algebra Subprograms. This is the suite of programs which, as its name implies, performs basic linear algebra routines such as vector copying, scaling and dot products; linear combinations; and matrix multiplication. ... [Read more...]

Quant finance blogs

October 22, 2013 | Pat

What I’ve learned from updating the blogroll. New entries The easy option is to go to The Whole Street which aggregates lots of quant finance blogs. Somehow Bookstaber missed out being on the blogroll before — definitely an oversight. Timely Portfolio was another that I was surprised wasn’t already ...
[Read more...]

Review: Kölner R Meeting 18 October 2013

October 22, 2013 | Markus Gesmann

The Cologne R user group met last Friday for two talks on split apply combine in R and XLConnect by Bernd Weiß and Günter Faes respectively, before the usual Schnitzel and Kölsch at the Lux.Split apply combine in R The apply family of functions in R is ... [Read more...]

machine learning [book review, part 2]

October 21, 2013 | xi'an

The chapter (Chap. 3) on Bayesian updating or learning (a most appropriate term) for discrete data is well-done in Machine Learning, a probabilistic perspective if a bit stretched (which is easy with 1000 pages left!). I like the remark (Section 3.5.3) about the log-sum-exp trick. While lengthy, the chapter (Chap. 4) on Gaussian models ... [Read more...]

Video: Time-to-event models

October 21, 2013 | David Smith

If you're trying to predict when an event will occur (for example, a consumer buying a product) or trying to infer why events occur (what were the factors that led to a component failing?), time-to-event models are a useful framework. These models are closely related to survival analysis in life ... [Read more...]

character handling: mean() vs sd()

October 21, 2013 | Lee Pang

Here’s a weird R error/bug/nuance I came across today: What would you expect the following lines of code to return?
<span>x </span><span>=</span><span> c</span><span>(</span><span>'1'</span><span>,</span><span> </span><span>'2'</span><span>,</span><span> </span><span>'3'</span><span>)</span><span><br>mean</span><span>(</span><span>x</span><span>)</span><span><br>sd</span><span>(</span><span>x</span><span>)</span>
Well, apparently it is:
<span># mean(x)</span><span><br></span><span>[</span><span>1</span><span>]</span><span> NA<br><br></span><span># sd(x)</span><span><br></span><span>[</span><span>1</span><span>]</span><span> </span><span>1</span>
So, sd() silently converts its input to numeric, while mean() does not. More evidence of this is in the source:
<span>></span><span> mean<br></span><span>function</span><span> </span><span>(</span><span>x</span><span>,</span><span> </span><span>...)</span><span> <br></span><span>UseMethod</span><span>(</span><span>"mean"</span><span>)</span><span><br></span><span><</span><span>bytecode</span><span>:</span><span> </span><span>0x000000001165e790</span><span>></span><span><br></span><span><</span><span>environment</span><span>:</span><span> </span><span>namespace</span><span>:</span><span>base</span><span>></span><span><br><br></span><span>></span><span> sd<br></span><span>function</span><span> </span><span>(</span><span>x</span><span>,</span><span> na</span><span>.</span><span>rm </span><span>=</span><span> FALSE</span><span>)</span><span> <br>sqrt</span><span>(</span><span>var</span><span>(</span><span>if</span><span> </span><span>(</span><span>is</span><span>.</span><span>vector</span><span>(</span><span>x</span><span>))</span><span> x </span><span>else</span><span> </span><span>as</span><span>.</span><span>double</span><span>(</span><span>x</span><span>),</span><span> na</span><span>.</span><span>rm </span><span>=</span><span> na</span><span>.</span><span>rm</span><span>))</span><span><br></span><span><</span><span>bytecode</span><span>:</span><span> </span><span>0x000000001158eb00</span><span>></span><span><br></span><span><</span><span>environment</span><span>:</span><span> </span><span>namespace</span><span>:</span><span>stats</span><span>></span>
... [Read more...]

Tracking the 2013 Hurricane Season

October 21, 2013 | Wesley

With it being the end of hurricane season it’s only appropriate to do a brief summary of the activity this year.   It’s been a surprisingly low-key season as far as hurricanes are concerned.  There have been only a few hurricanes and the barometric pressure of any hurricane this ... [Read more...]

Follow up to Johnson et al Post

October 20, 2013 | Corey Chivers

Last week I posted a comment on a paper by Neil Johnson and colleagues that I now regret. The comment amounted to a bit of statistical pedantry on my part regarding some of the wording in the paper. It was my wording in this post, and specifically the title, which ... [Read more...]

Bar plot with error bars in R

October 20, 2013 | heuristicandrew

Here's a simple way to make a bar plot with error bars three ways: standard deviation, standard error of the mean, and a 95% confidence interval. The key step is to precalculate the statistics for ggplot2. Continue reading → [Read more...]

machine learning [book review]

October 20, 2013 | xi'an

I have to admit the rather embarrassing fact that Machine Learning, A probabilistic perspective by Kevin P. Murphy is the first machine learning book I really read in detail…! It is a massive book with close to 1,100 pages and I thus hesitated taking it with me around, until I grabbed ... [Read more...]

How Do You Write Your Model Definitions?

October 20, 2013 | Rasmus Bååth

I’m often irritated by that when a statistical method is explained, such as linear regression, it is often characterized by how it can be calculated rather than by what model is assumed and fitted. A typical example of this is that linear regression is often described as a method ... [Read more...]
1 3 4 5 6 7 12

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)