Posts Tagged ‘ ggplot2 ’

Animating a spinner using ggplot2 and ImageMagick

July 18, 2017
By
Animating a spinner using ggplot2 and ImageMagick

It’s Sunday, and I [Bob] am just sitting on the couch peacefully ggplotting to illustrate basic sample spaces using spinners (a trick I’m borrowing from Jim Albert’s book Curve Ball). There’s an underlying continuous outcome (i.e., where the spinner lands) and a quantization into a number of regions to produce a discrete outcome (e.g., “success” […] The post Animating a spinner using ggplot2 and ImageMagick appeared first on Statistical Modeling,…

Read more »

Ordering Categories within ggplot2 Facets

December 23, 2016
By
Ordering Categories within ggplot2 Facets

I saw Simon Jackson’s recent blog post regarding ordering categories within facets. He proposed a way of dealing with the problem of ordering variables shared across facets within facets. This problem becomes apparent in text analysis where words are shared … Continue reading →

Read more »

3D density plot in R with Plotly

June 30, 2016
By
3D density plot in R with Plotly

In Bayesian nonparametrics, many models address the problem of density regression, including covariate dependent processes. These were settled by the pioneering works by [current ISBA president] MacEachern (1999) who introduced the general class of dependent Dirichlet processes. The literature on dependent processes was developed in numerous models, such as nonparametric regression, time series data, meta-analysis, to cite but […]

Read more »

googleformr at Work: Pneumatic Road Tube Allegory

May 12, 2016
By
googleformr at Work: Pneumatic Road Tube Allegory

Steve Simpson (@data_steve) created the googleformr package to enable users to easily send information to a Google Form.  It’s a nice way to send and securely store data via R and the price is great…FREE! A Pneumatic Road Tube Allegory…Kinda … Continue reading →

Read more »

How do I re-arrange??: Ordering a plot re-revisited

March 3, 2016
By
How do I re-arrange??: Ordering a plot re-revisited

Several years back I wrote a two part blog series in response to seeing questions about plotting and reordering on list serves, talkstats.com, and stackoverflow.  Part I discussed the basics of reordering plots by reordering factor levels.  The essential gist was: … Continue reading →

Read more »

The Simple Reason Sanders Is Winning

February 13, 2016
By
The Simple Reason Sanders Is Winning

Sanders has way more backers across the United States (with the possible exception of the South). Hillary Clinton might be doing well at the polls. However, the shocking fact of polling is that only 8-9% of those asked to participate in polls combined ...

Read more »

Repel overlapping text labels in ggplot2

January 8, 2016
By
Repel overlapping text labels in ggplot2

A while back I showed you how to make volcano plots in base R for visualizing gene expression results. This is just one of many genome-scale plots where you might want to show all individual results but highlight or call out important results by labeli...

Read more »

Kickin’ it with elastic net regression

August 20, 2015
By
Kickin’ it with elastic net regression

With the kind of data that I usually work with, overfitting regression models can be a huge problem if I'm not careful. Ridge regression is a really effective technique for thwarting overfitting. It does this by penalizing the L2 norm… Continue reading →

Read more »

Why I use Panel/Multilevel Methods

July 24, 2015
By
Why I use Panel/Multilevel Methods

I don’t understand why any researcher would choose not to use panel/multilevel methods on panel/hierarchical data. Let’s take the following linear regression as an example: , where is a random effect for the i-th group. A pooled OLS regression model for the above is unbiased and consistent. However, it will be inefficient, unless for all […]

Read more »

Wanted: A Perfect Scatterplot (with Marginals)

June 12, 2015
By

We saw this scatterplot with marginal densities the other day, in a blog post by Thomas Wiecki: The graph was produced in Python, using the seaborn package. Seaborn calls it a “jointplot;” it’s called a “scatterhist” in Ma...

Read more »


Subscribe

Email:

  Subscribe