Blog Archives

Principal curves example (Elements of Statistical Learning)

April 21, 2016
By
Principal curves example (Elements of Statistical Learning)

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...

Read more »

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
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

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...

Read more »

Reference Chart for Precision of Wilson Binomial Proportion Confidence Interval

October 16, 2015
By
Reference Chart for Precision of Wilson Binomial Proportion Confidence Interval

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...

Read more »

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

October 9, 2015
By
Delta Method Confidence Bands for Gaussian Mixture Density (Can Behave Badly)

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...

Read more »

Delta Method Confidence Bands for Gaussian Density

October 2, 2015
By
Delta Method Confidence Bands for Gaussian Density

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...

Read more »

Notes on Multivariate Gaussian Quadrature (with R Code)

September 25, 2015
By
Notes on Multivariate Gaussian Quadrature (with R Code)

Statisticians often need to integrate some function with respect to the multivariate normal (Gaussian) distribution, for example, to compute the standard error of a statistic, or the likelihood function in of a mixed effects model. In many (most?) useful cases, these integrals are intractable, and must be approximated using computational methods. Monte-Carlo integration is one

Read more »

Recipe for Computing and Sampling Multivariate Kernel Density Estimates (and Plotting Contours for 2D KDEs).

September 19, 2015
By
Recipe for Computing and Sampling Multivariate Kernel Density Estimates (and Plotting Contours for 2D KDEs).

The code snippet below creates the above graphic: ## radially symmetric kernel (Gussian kernel) RadSym

Read more »

Recipe for Centered Horizontal Stacked Barplots (Useful for Likert scale responses)

September 8, 2015
By
Recipe for Centered Horizontal Stacked Barplots (Useful for Likert scale responses)

There is a nice package and paper about this here: http://www.jstatsoft.org/v57/i05/paper. However, the associated code is complex and uses lattice. Here's a brief recipe using base graphics that implements the above figure: set.seed(40) x

Read more »

Nested vs. Non-nested (crossed) Random Effects in R

June 13, 2015
By
Nested vs. Non-nested (crossed) Random Effects in R

The R script below illustrates the nested versus non-nested (crossed) random effects functionality in the R packates lme4 and nlme. Note that crossed random effects are difficult to specify in the nlme framework. Thus, I've included a back-of-the-envelope (literally a scanned image of my scribble) interpretation of the 'trick' to specifying crossed random effects for

Read more »

Simulation-based power analysis using proportional odds logistic regression

May 22, 2015
By
Simulation-based power analysis using proportional odds logistic regression

Consider planning a clinicial trial where patients are randomized in permuted blocks of size four to either a 'control' or 'treatment' group. The outcome is measured on an 11-point ordinal scale (e.g., the numerical rating scale for pain). It may be reasonable to evaluate the results of this trial using a proportional odds cumulative logit

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)