ggplot2: Back-to-back Bar Charts

September 23, 2009
By
ggplot2: Back-to-back Bar Charts

On the ggplot2 mailing-list the following question was asked: How to create a back-to-back bar chart with ggplot2? For anyone who don’t know what I am talking about, have a look on a recent paper from the EU. I’d like to create plots like the graphs 5,6,18 in the paper. An example graph from the above report is

Read more »

ggplot2: Back-to-back Bar Charts

September 23, 2009
By
ggplot2: Back-to-back Bar Charts

On the ggplot2 mailing-list the following question was asked: How to create a back-to-back bar chart with ggplot2? For anyone who don’t know what I am talking about, have a look on a recent paper from the EU. I’d like to create plots like the graph...

Read more »

Solar Trends: Total Solar Irradiance Since 1611 – Update

September 23, 2009
By
Solar Trends: Total Solar Irradiance Since 1611 – Update

This is the 2nd in a series of  posts I will be doing on solar trends. In this post, I show how to retrieve online daily satellite and reconstructed TSI data,   plot the daily data as well as annual and 11 year moving average smooths for the data series.  Links to

Read more »

High yield spread

September 23, 2009
By
High yield spread

Last week I had opportunity to participate at NYU, where one of the lecturers was Z-score man’s. He spent same time talking about the high yield spread as measure of the macro economy. Then spread is high (junk bonds become very cheap and Treasuries become ‘gold’) -  crisis is right here. Intuitively, it is similar

Read more »

R Sessions 33: Select (nested) observations with equal number of occurences

September 23, 2009
By

Recently, I was contacted with an question about R code. A befriended researcher was working with nested data, which was unbalanced. He was working with data in a ‘long’ format: all observations nested within the same group had the same ...

Read more »

RGG #158:161: examples of package IDPmisc

September 23, 2009
By
RGG #158:161: examples of package IDPmisc

three new graphs have made their way to the graph gallery, submitted by Reto Burgin Image lag plot matrix Image scatter plot matrix Regular time series

Read more »

R Function of the Day: rle

September 22, 2009
By

Edit: This post originally appeared on my Wordpress blog on September 22, 2009. I present it here in its original form. The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on sim...

Read more »

R Function of the Day: rle

September 22, 2009
By

Edit: This post originally appeared on my Wordpress blog on September 22, 2009. I present it here in its original form. The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on sim...

Read more »

Emacs Key Binding for eval-defun in lisp-mode

September 22, 2009
By
Emacs Key Binding for eval-defun in lisp-mode

When I use R in Emacs through the ESS package, C-c C-c in a .R buffer will send a “block” of code to the inferior R process for evaluation. This was added just a few years ago, but my fingers are now trained to use that key combination for evaluating any block of code. Since

Read more »

Update

September 22, 2009
By
Update

I can't believe it's been two months since I last posted... wow, time has a way of slipping through my fingers.  Here's a short list of some upcoming posts: An introduction to LSPM -- a new R package that implements Ralph Vince's leverage space po...

Read more »

SAS: “The query requires remerging summary statistics back with the original data”

September 22, 2009
By
SAS: “The query requires remerging summary statistics back with the original data”

Coming from a background writing SQL code directly for “real” RDBMS (Microsoft SQL Server, MySQL, and SQLite), I was initially confused when SAS would give me the following ‘note’ for a simple summary PROC SQL query: 429 proc sql; 430 create table undel_monthly as 431 select 432 year(date) as year, 433 month(date) as month, 434

Read more »

R Function of the Day: table

September 21, 2009
By
R Function of the Day: table

The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on simple examples that you can apply to gain insight into your own data. Today, I will discuss the table function. What situation is table useful in? The table function is a very basic, but

Read more »

R Function of the Day: table

September 21, 2009
By

Edit: This post originally appeared on my Wordpress blog on September 21, 2009. I present it here in its original form. The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on si...

Read more »

Comparison of plots using Stata, R base, R lattice, and R ggplot2, Part I: Histograms

September 21, 2009
By

One of the nicer things about many statistics packages is the extremely granular control you get over your graphical output.  But I lack the patience to set dozens of command line flags in R, and I'd rather not power the computer by pumping the mouse trying to set all the clicky-box options in Stata's graphics editor.  I want something...

Read more »

Linking text, results, and analyses: Increasing transparency and efficiency

September 20, 2009
By
Linking text, results, and analyses: Increasing transparency and efficiency

I have recently been thinking about the relationship between text in a final report and data analysis. The broader concern is with making the conduct and reporting of statistical analyses more transparent. I am inspired by the ideas of literate program...

Read more »

R Function of the Day: tapply

September 20, 2009
By

Edit: This post originally appeared on my Wordpress blog on September 20, 2009. I present it here in its original form. The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on sim...

Read more »

Welcome to Sigmafield

September 20, 2009
By

Edit: This post originally appeared on my Wordpress blog on September 20, 2009. I present it here in its original form. John Tukey's preface to Exploratory Data Analysis begins with a useful rule, "It is important to understand what you can...

Read more »

Structural Equation Modelling in R

September 20, 2009
By
Structural Equation Modelling in R

Structural Equation Modelling (SEM) Software is frequently used in psychology. This post discusses the exciting prospect of greater support for SEM in R. ...I have used SEM to:Run confirmatory factor analyses to examine the measurement structure of mul...

Read more »

R Function of the Day: tapply

September 20, 2009
By
R Function of the Day: tapply

The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on simple examples that you can apply to gain insight into your own data. Today, I will discuss the tapply function. What situation is tapply useful in? In statistics, one of the most basic activities

Read more »

RInside release 0.1.0 — and now on CRAN

September 20, 2009
By

Version 0.1.0 of RInside, my C++ wrapper classes which facilitate embedding R into your own C++ application, has been released and is now an official CRAN package. This release improves on the build process and should work on any sane Unix-alike o...

Read more »

RInside release 0.1.0 — and now on CRAN

September 20, 2009
By

Version 0.1.0 of RInside, my C++ wrapper classes which facilitate embedding R into your own C++ application, has been released and is now an official CRAN package. This release improves on the build process and should work on any sane Unix-alike opera...

Read more »

RInside release 0.1.0 — and now on CRAN

September 20, 2009
By

Version 0.1.0 of RInside, my C++ wrapper classes which facilitate embedding R into your own C++ application, has been released and is now an official CRAN package. This release improves on the build process and should work on any sane Unix-alike o...

Read more »

Welcome to Blogistic Reflections! (A blog created entirely in Emacs org-mode)

September 19, 2009
By
Welcome to Blogistic Reflections! (A blog created entirely in Emacs org-mode)

John Tukey’s preface to Exploratory Data Analysis begins with a useful rule, “It is important to understand what you can do before you learn to measure how well you seem to have done it.” When I decided I wanted to start a blog concentrating on statistics, R, and Emacs, I thought I had better learn

Read more »

Power Analysis for mixed-effect models in R

September 18, 2009
By
Power Analysis for mixed-effect models in R

The power of a statistical test is the probability that a null hypothesis will be rejected when the alternative hypothesis is true. In lay terms, power is your ability to refine or "prove" your expectations from the data you collect. The most frequent...

Read more »

Power Analysis for mixed-effect models in R

September 18, 2009
By
Power Analysis for mixed-effect models in R

The power of a statistical test is the probability that a null hypothesis will be rejected when the alternative hypothesis is true. In lay terms, power is your ability to refine or "prove" your expectations from the data you collect. The most frequent...

Read more »

Web-Based Multilevel Modeling

September 18, 2009
By

This is tremendously cool. A nice intuitive web-based interface for the lme4 package in R (and you neither need to know R or understand the intricacies of the lme4 package) that gives you pdf output and plots. If you just want to play around and not worry about coding things up, it’s a great little

Read more »

Set your R working directory in TextWrangler

Set your R working directory in TextWrangler

Yesterday I figured out (together with a friend, Leendert) how to set your R working directory to the path of the current document you're working on in TextWrangler. We developed two scripts: one for setting the working directory of R directly, and one...

Read more »

R Community in Australia

September 17, 2009
By
R Community in Australia

One of the nice aspects of R is the community of users that has built up around it. The open-source model seems to create an orientation of sharing and contribution. Users benefit from R and then they give back in the form of new packages, free documen...

Read more »

Workflow in R

September 17, 2009
By
Workflow in R

This came up recently on StackOverflow. One of the answers was particularly helpful and I thought it might be worth mentioning here. The idea presented there is  to break the code into four files, all stored in your project directory. These four files are to be processed in the following order. load.R This file includes

Read more »