Blog Archives

Quick illustration of Metropolis and Metropolis-in-Gibbs Sampling in R

June 4, 2017
By

The code below gives a simple implementation of the Metropolis and Metropolis-in-Gibbs sampling algorithms, which are useful for sampling probability densities for which the normalizing constant is difficult to calculate, are irregular, or have high dimension (Metropolis-in-Gibbs). ## Metropolis sampling ## x - current value of Markov chain (numeric vector) ## targ - target log … Continue reading Quick illustration of Metropolis and Metropolis-in-Gibbs Sampling in R →

Two figures on the accuracy of polygraphs as lie detectors.

September 2, 2016
By

Here's a pair of figures from a 2003 report by the National Academies 'Committee to Review the Scientific Evidence on the Polygraph' (full text), which includes several well-known statisticians. The figure below shows the sensitivity versus false-positive rate for 52 controlled laboratory studies of naive examinees, untrained in polygraph countermeasures. Each study examinee was assigned … Continue reading Two figures on the accuracy of polygraphs as lie detectors. →

Round values while preserve their rounded sum in R

July 28, 2016
By

After an embarrassing teleconference in which I presented a series of percentages that did not sum to 100 (as they should have), I found some R code on stackoverflow.com to help me to avoid this in the future. In general, the sum of rounded numbers (e.g., using the base::round function) is not the same as … Continue reading Round values while preserve their rounded sum in R →

Principal curves example (Elements of Statistical Learning)

April 21, 2016
By

The bit of R code below illustrates the principal curves methods as described in The Elements of Statistical Learning, by Hastie, Tibshirani, and Friedman (Ch. 14; the book is freely available from the authors' website). Specifically, the code generates some bivariate data that have a nonlinear association, initializes the principal curve using the first (linear) principal … Continue reading Principal curves example (Elements of Statistical Learning) →

My Poster at Rocky 2015: Estimating parameters of the Hodgkin-Huxley cardiac cell model by integrating raw data from multiple types of voltage-clamp experiments

December 18, 2015
By

I'm recently returned from the 2015 Rocky Mountain Bioinformatics Conference, where I presented the above poster. This is work with a colleague, Rick Gray, at the FDA. He and I collaborate on our NIH award "Optimal Design of Challenge-Response Experiments in Cardiac Electrophysiology" (HL118392) The (original) poster abstract is below, but the poster content is … Continue reading My Poster at Rocky 2015: Estimating parameters of the Hodgkin-Huxley cardiac cell…

‘The Libertarian Republic’ author refers to Obamacare ‘spike’ in medical adminstrators before it even became law.

December 3, 2015
By

I don't usually read 'The Libertarian Republic', but this article was shared by a friend on my Facebook feed. The author writes that the 'armies of bureaucrats' (i.e., medical administrators), necessitated by government regulation, are responsible for the rise in medical costs. The evidence presented is a figure that shows the growth of physicians and … Continue reading 'The Libertarian Republic' author refers to Obamacare 'spike' in medical adminstrators before…

Reference Chart for Precision of Wilson Binomial Proportion Confidence Interval

October 16, 2015
By

I am often asked about the number of subjects needed to study a binary outcome, which usually leads to a discussion of confidence intervals for binary proportions, and the associated precision. Sometimes the precision is quantified as the width or half-width of a 95% confidence interval. For proportions, I like the Wilson score interval because … Continue reading Reference Chart for Precision of Wilson Binomial Proportion Confidence Interval →

Delta Method Confidence Bands for Gaussian Mixture Density (Can Behave Badly)

October 9, 2015
By

This post follows from a previous post (2798), in which the delta method was used to create an approximate pointwise 95% confidence band for a Gaussian density estimate. Note that the quality of this estimate was not assessed (e.g., whether the band has the correct pointwise coverage). Here we extend that approach to the Gaussian … Continue reading Delta Method Confidence Bands for Gaussian Mixture Density (Can Behave Badly) →

Delta Method Confidence Bands for Gaussian Density

October 2, 2015
By

During one of our Department's weekly biostatistics "clinics", a visitor was interested in creating confidence bands for a Gaussian density estimate (or a Gaussian mixture density estimate). The mean, variance, and two "nuisance" parameters, were simultaneously estimated using least-squares. Thus, the approximate sampling variance-covariance matrix (4x4) was readily available. The two nuisance parameters do not … Continue reading Delta Method Confidence Bands for Gaussian Density →

Arbitrage with the In-laws!

September 30, 2015
By

I've just discovered the Predictit.org website, which is a "Prediction Market" where participants can place bets on the occurrence of future events, such as the outcome of political elections. Predictit.org is similar in function to the defunct website Intrade.com (Wikipedia). But, unlike Intrade.com, they seem to have done their homework with U.S. regulatory bodies beforehand. … Continue reading Arbitrage with the In-laws! →