Study of a plot

December 3, 2014

(This article was first published on » R, and kindly contributed to R-bloggers)

I began to think on a nice way of plotting campaign expenditures in a paper I’m working on. I thought this would be something like the following–simple but meaningful even when there are outliers in both tails.

Though I like the seniors Tukey’s boxplot and scatter plots, I had already used them the last time I published about this topic, so I’d like to oxygenate my figures; I thought a type of Manhattan plot could do the job.

The very idea is to have types of elections, districts or parties along the X-axis, with the negative logarithm of the association (p-value) between a candidate’s spending and votes displayed on the Y-axis. Thus, each dot on the plot indicates a candidate’s position on this metric. Because stronger associations have the smallest p-values (a log of 0.05 = -1.30103), their negative logarithms will be positivie and higher (e.g., 1.3), while those with p-values not statistically significant (whatever that means these days, maybe nothing ) will stay below this line.

The positive thing of this version is that it draws our attention to the upper outliers instead to the average association, which tends to be left-skewed because Brazilian elections typically attract many sacrificial lamb candidates who expend nearly nothing in their campaigns.


To leave a comment for the author, please follow the link and comment on their blog: » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


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)