Posts Tagged ‘ code ’

MCMC as a Stream

April 1, 2017
By
MCMC as a Stream

Introduction This weekend I’ve been preparing some material for my upcoming Scala for statistical computing short course. As part of the course, I thought it would be useful to walk through how to think about and structure MCMC codes, and in particular, how to think about MCMC algorithms as infinite streams of state. This material … Continue reading MCMC as a Stream

Read more »

How to include formulas (LaTeX) and code blocks in WordPress posts and replies

December 24, 2016
By
How to include formulas (LaTeX) and code blocks in WordPress posts and replies

It’s possible to include LaTeX formulas like . I entered it as $latex \int e^x \, \mathrm{d}x$. You can also generate code blocks like this for (n in 1:N) y[n] ~ normal(0, 1); The way to format them is to use <pre> to open the code block and </pre> to close it. You can create […] The post How to include formulas (LaTeX) and code blocks in WordPress posts and…

Read more »

Statistical rethinking [book review]

April 5, 2016
By
Statistical rethinking [book review]

Statistical Rethinking: A Bayesian Course with Examples in R and Stan is a new book by Richard McElreath that CRC Press sent me for review in CHANCE. While the book was already discussed on Andrew’s blog three months ago, and [rightly so!] enthusiastically recommended by Rasmus Bååth on Amazon, here are the reasons why I […]

Read more »

New R Code for High-Frequency Financial Data Analysis

February 11, 2016
By

I looked through the manual (below). Looks well done.From the email:Package features estimators for working with high frequency market data.Microstructure Noise:- Autocovariance Noise Variance- Realized Noise Variance- Unbiased Realized Noise Variance...

Read more »

Write unit tests!

December 7, 2015
By
Write unit tests!

Since 2000, I’ve been working on R/qtl, an R package for mapping the genetic loci (called quantitative trait loci, QTL) that contribute to variation in quantitative traits in experimental crosses. The Bioinformatics paper about it is my most cited; also see my 2014 JORS paper, “Fourteen years of R/qtl: Just barely sustainable.” It’s a bit […]

Read more »

It’s not you, it’s me

September 24, 2015
By
It’s not you, it’s me

Somehow when my code stops working, my first (and second, and third) reaction is to blame everything except my own code. (“It’s not me, it’s you.”) And almost always, it’s my own code that’s the problem (hence the title of this post). I spent the day trying to resolve a bug in my early-in-development R […]

Read more »

It’s not you, it’s me

September 24, 2015
By
It’s not you, it’s me

Somehow when my code stops working, my first (and second, and third) reaction is to blame everything except my own code. (“It’s not me, it’s you.”) And almost always, it’s my own code that’s the problem (hence the title of this post). I spent the day trying to resolve a bug in my early-in-development R […]

Read more »

Randomized Hobbit

June 22, 2015
By
Randomized Hobbit

@wrathematics pointed me to his ngram R package for constructing and simulating from n-grams from text. I’d recently grabbed the text of the hobbit, and so I applied it to that text, with amusing results. Here’s the code I used to grab the text. Then calculate the ngrams with n=2. Simulate some number of words […]

Read more »

Randomized Hobbit

June 22, 2015
By
Randomized Hobbit

@wrathematics pointed me to his ngram R package for constructing and simulating from n-grams from text. I’d recently grabbed the text of the hobbit, and so I applied it to that text, with amusing results. Here’s the code I used to grab the text. Then calculate the ngrams with n=2. Simulate some number of words […]

Read more »

Error notifications from R

September 5, 2014
By
Error notifications from R

I’m enthusiastic about having R notify me when my script is done. But among my early uses of this, my script threw an error, and I never got a text or pushbullet about that. And really, I’m even more interested in being notified about such errors than anything else. It’s relatively easy to get notified […]

Read more »


Subscribe

Email:

  Subscribe