Blog Archives

quantile functions: mileage may vary

May 11, 2015
By
quantile functions: mileage may vary

When experimenting with various quantiles functions in R, I was shocked by how widely the execution times would vary. To the point of blaming a completely different feature of R. Borrowing from Charlie Geyer’s webpage on the topic of probability distributions in R, here is

Read more »

arbitrary distributions with set correlation

May 10, 2015
By
arbitrary distributions with set correlation

A question recently posted on X Validated by Antoni Parrelada: given two arbitrary cdfs F and G, how can we simulate a pair (X,Y) with marginals  F and G, and with set correlation ρ? The answer posted by Antoni Parrelada was to reproduce the Gaussian copula solution: produce (X’,Y’) as a Gaussian bivariate vector with

Read more »

corrected MCMC samplers for multivariate probit models

May 5, 2015
By
corrected MCMC samplers for multivariate probit models

“Moreover, IvD point out an error in Nobile’s derivation which can alter its stationary distribution. Ironically, as we shall see, the algorithms of IvD also contain an error.”  Xiyun Jiao and David A. van Dyk arXived a paper correcting an MCMC sampler and R package MNP for the multivariate probit model, proposed by Imai and

Read more »

take those hats off [from R]!

May 4, 2015
By
take those hats off [from R]!

This is presumably obvious to most if not all R programmers, but I became aware today of a hugely (?) delaying tactic in my R codes. I was working with Jean-Michel and Natesh and when coding an MCMC run I was telling them that I usually preferred to code

Read more »

Le Monde puzzle [#909]

April 30, 2015
By
Le Monde puzzle [#909]

Another of those “drop-a-digit” Le Monde mathematical puzzle: Find all integers n with 3 or 4 digits an single interior zero digit, such that removing that zero digit produces a divider of x. As in puzzle #904, I made use of the digin R function: and simply checked all integers up to 10⁶: which leads

Read more »

the most patronizing start to an answer I have ever received

April 29, 2015
By
the most patronizing start to an answer I have ever received

Another occurrence of a question on X validated where the originator (primitivus petitor) was trying to get an explanation without the proper background. On either Bayesian statistics or simulation. The introductory sentence to the question was about “trying to understand how the choice of priors affects a Bayesian model estimated using MCMC”

Read more »

scale acceleration

April 23, 2015
By
scale acceleration

Kate Lee pointed me to a rather surprising inefficiency in matlab, exploited in Sylvia Früwirth-Schnatter’s bayesf package: running a gamma simulation by rgamma(n,a,b) takes longer and sometimes much longer than rgamma(n,a,1)/b, the latter taking advantage of the scale nature of b. I wanted to check on my own whether or not R faced the same

Read more »

simulating correlated Binomials [another Bernoulli factory]

April 20, 2015
By
simulating correlated Binomials [another Bernoulli factory]

This early morning, just before going out for my daily run around The Parc, I checked X validated for new questions and came upon that one. Namely, how to simulate X a Bin(8,2/3) variate and Y a Bin(18,2/3) such that corr(X,Y)=0.5. (No reason or motivation provided for this constraint.) And I thought the following (presumably

Read more »

Bernouilli, Montmort and Waldegrave

April 14, 2015
By
Bernouilli, Montmort and Waldegrave

In the last issue of Statistical Science, David Belhouse   and Nicolas Fillion published an accounting of a discussion between Pierre Rémond de Montmort, Nicolaus Bernoulli—”the” Bernoulli associated with the St. Petersburg paradox—, and Francis Waldegrave, about the card game of Le Her (or Hère, for wretch). Here is the abridged

Read more »

failures and uses of Jaynes’ principle of transformation groups

April 13, 2015
By
failures and uses of Jaynes’ principle of transformation groups

This paper by Alon Drory was arXived last week when I was at Columbia. It reassesses Jaynes’ resolution of Bertrand’s paradox, which finds three different probabilities for a given geometric event depending on the underlying σ-algebra (or definition of randomness!). Both Poincaré and Jaynes argued against Bertrand that there was only one acceptable solution under

Read more »

Sponsors

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)