Blog Archives

Probability of winning a best-of-7-series (part 2)

April 25, 2019
By
Probability of winning a best-of-7-series (part 2)

In this previous post, I explored the probability that a team wins a best-of-n series, given that its win probability for any one game is some constant . As one commenter pointed out, most sports models consider the home team … Continue reading →

Read more »

Probability of winning a best-of-7 series

April 22, 2019
By
Probability of winning a best-of-7 series

The NBA playoffs are in full swing! A total of 16 teams are competing in a playoff-format competition, with the winner of each best-of-7 series moving on to the next round. In each matchup, two teams play 7 basketball games … Continue reading →

Read more »

Two interesting facts about high-dimensional random projections

April 16, 2019
By
Two interesting facts about high-dimensional random projections

John Cook recently wrote an interesting blog post on random vectors and random projections. In the post, he states two surprising facts of high-dimensional geometry and gives some intuition for the second fact. In this post, I will provide R … Continue reading →

Read more »

The sinh-arcsinh normal distribution

April 15, 2019
By
The sinh-arcsinh normal distribution

This month’s issue of Significance magazine has a very nice summary article of the sinh-arcsinh normal distribution. (Unfortunately, the article seems to be behind a paywall.) This distribution was first introduced by Chris Jones and Arthur Pewsey in 2009 as … Continue reading →

Read more »

Testing numeric variables for NA/NaN/Inf

April 9, 2019
By

In R, a numeric variable is either a number (like 0, 42, or -3.14), or one of 4 special values: NA, NaN, Inf or -Inf. It can be hard to remember how the is.x functions treat each of the special … Continue reading →

Read more »

Many ways to do the same thing: linear regression

April 7, 2019
By

One feature of R (could be positive, could be negative) is that there are many ways to do the same thing. In this post, I list out the different ways we can get certain results from a linear regression model. … Continue reading →

Read more »

Plots within plots with ggplot2 and ggmap

February 23, 2019
By
Plots within plots with ggplot2 and ggmap

Once in a while, you might find yourself wanting to embed one plot within another plot. ggplot2 makes this really easy with the annotation_custom function. The following example illustrates how you can achieve this. (For all the code in one … Continue reading →

Read more »

Quantile regression in R

January 31, 2019
By
Quantile regression in R

Quantile regression: what is it? Let be some response variable of interest, and let be a vector of features or predictors that we want to use to model the response. In linear regression, we are trying to estimate the conditional … Continue reading →

Read more »

pcLasso: a new method for sparse regression

January 13, 2019
By
pcLasso: a new method for sparse regression

I’m excited to announce that my first package has been accepted to CRAN! The package pcLasso implements principal components lasso, a new method for sparse regression which I’ve developed with Rob Tibshirani and Jerry Friedman. In this post, I will … Continue reading →

Read more »

A deep dive into glmnet: offset

January 9, 2019
By
A deep dive into glmnet: offset

I’m writing a series of posts on various function options of the glmnet function (from the package of the same name), hoping to give more detail and insight beyond R’s documentation. In this post, we will look at the offset … Continue reading →

Read more »

Search R-bloggers

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)