1756 search results for "Ggplot2"

Probit/Logit Marginal Effects in R

April 23, 2012
By
Probit/Logit Marginal Effects in R

The common approach to estimating a binary dependent variable regression model is to use either the logit or probit model. Both are forms of generalized linear models (GLMs), which can be seen as modified linear regressions that allow the dependent variable to originate from non-normal distributions. The coefficients in a linear regression model are marginal

Read more »

Visualising the Path of a Genetic Algorithm

April 23, 2012
By
Visualising the Path of a Genetic Algorithm

We quite regularly use genetic algorithms to optimise over the ad-hoc functions we develop when trying to solve problems in applied mathematics. However it’s a bit disconcerting to have your algorithm roam through a high dimensional solution space while not being able to picture what it’s doing or how close one solution is to another. … Continue reading...

Read more »

118 years of US State Weather Data

April 22, 2012
By
118 years of US State Weather Data

A recent post on the Junkcharts blog looked at US weather dataand the importance of explaining scales (which in this case went up to 118). Ultimately, it turns out that 118 is the rank of the data compared to the previous 117 years of data (in ascending order, so that 118 is the highest). At … Continue reading...

Read more »

Generating all subsets of a set

April 20, 2012
By
Generating all subsets of a set

Recently I have calculated Banzhaf power index. I required generation of all subsets of a given set. The code given there was a bit complex and I have decided to write a simple function calculating it. As an example of its application I reproduce Figur...

Read more »

An R Script to Automatically download PubMed Citation Counts By Year of Publication

April 19, 2012
By
An R Script to Automatically download PubMed Citation Counts By Year of Publication

Ever wanted to look at PubMed trends and make elegant graphs of them? Here’s an R script that will do it automatically for you.

Read more »

Small Countries Stablize by Exporting High-Tech

April 18, 2012
By
Small Countries Stablize by Exporting High-Tech

Smaller countries lead the way. When you think of 'high-tech', which countries come to mind? What is 'High-Tech'? Before continuing, what is meant by the term 'high-tech'? As defined by the World Data Bank, high-technology exports ar...

Read more »

A word cloud where the x and y axes mean something

April 17, 2012
By
A word cloud where the x and y axes mean something

Ok so I have now done two iterations on a better way to visualize term frequencies using R, ggplot2 and plyr. The first was ok but ugly, the second was better but still ugly. How to read it: Frequency is segmented in to 20% quantiles The frequency is on the y axis Word size is

Read more »

Quickly Explore the Penn World Tables in R

April 17, 2012
By
Quickly Explore the Penn World Tables in R

The Penn World Tables are one of the greatest source of worldwide macroeconomic data, but dealing with its web interface is somewhat cumbersome. Fortunately, the data is also available as a R package on CRAN. Having some tools at hand … Continue reading →

Read more »

The (Un)disputed Champion of Psychotherapy – Clinical psychologists and their theoretical orientations

April 17, 2012
By
The (Un)disputed Champion of Psychotherapy – Clinical psychologists and their theoretical orientations

Cognitive Behavioral Therapy is the psychological treatment of choice for many, if not all, mental disorders. Nonetheless a majority of US clinical psychologist do not primarily identify themselves as either cognitive or behavioral therapists. Looking at data from PubMed publication counts a clear picture emerges; psychodynamic researchers might just be research loafers.

Read more »

Linguistic Notation Inside of R Plots!

April 14, 2012
By
Linguistic Notation Inside of R Plots!

So, I've been playing around with learning knitr, which is a Sweave-like R package for combining LaTeX and R code into one document. There's almost no learning curve if you already use Sweave, and I find a lot of knitr's design and usage to be a lot nicer.I wasn't going to make a blog post or tutorial about...

Read more »