Publications by Christopher Bare

Using R for Introductory Statistics 3.2

06.06.2010

…continuing my sloth-like progress through John Verzani’s Using R for Introductory Statistics. Previous installments: Chapters 1 and 2 and 3.1. Comparing independent samples Boxplots provide a visual comparison between two or more distributions. For problem 3.8, we’re asked to compare the reaction times of cell phone users verses a control ...

1738 sym R (582 sym/3 pcs) 8 img

Using R for Introductory Statistics 3.3

11.08.2010

…continuing our way though John Verzani’s Using R for introductory statistics. Previous installments: chapt1&2, chapt3.1, chapt3.2 Relationships in numeric data If two data series have a natural pairing (x1,y1),…,(xn,yn), then we can ask, “What (if any) is the relationship between the two variables?” Scatterplots and correlation are fir...

3572 sym R (1044 sym/9 pcs) 8 img

Using R for Introductory Statistics, Chapter 3.4

21.08.2010

…a continuing journey through Using R for Introductory Statistics, by John Verzani. Simple linear regression Linear regression is a kooky term for fitting a line to some data. This odd bit of terminology can be blamed on Sir Francis Galton, a prolific victorian scientist and traveler who saw it as related to his concept of regression toward the...

4751 sym R (1561 sym/8 pcs) 20 img

How to send an HTTP PUT request from R

27.09.2010

I wanted to get R talking to CouchDB. CouchDB is a NoSQL database that stores JSON documents and exposes a ReSTful API over HTTP. So, I needed to issue the basic HTTP requests: GET, POST, PUT, and DELETE from within R. Specifically, to get started, I wanted to add documents to the database using PUT. There’s CRAN package called httpRequest, whi...

6488 sym R (2794 sym/3 pcs) 4 img

CouchDB and R

02.10.2010

Here are some quick crib notes on getting R talking to CouchDB using Couch’s ReSTful HTTP API. We’ll do it in two different ways. First, we’ll construct HTTP calls with RCurl, then move on to the R4CouchDB package for a higher level interface. I’ll assume you’ve already gotten started with CouchDB and are familiar with the basic ReST ac...

3489 sym R (2500 sym/13 pcs) 4 img

Using R for Introductory Statistics, Chapter 4

12.12.2010

Chapter 4 of Using R for Introductory Statistics gets us started working with multivariate data. The question is: what are the relationships among the variables? One way to go about answering it is by pairwise comparison of variables. Another technique is to divide the data into categories by the values of some variables and analyze the remaining...

6267 sym R (2900 sym/5 pcs) 12 img

Using R for Introductory Statistics, Chapter 4, Model Formulae

10.01.2011

Several R functions take model formulae as parameters. Model formulae are symbolic expressions. They define a relationship between variables rather than an arithmetic expression to be evaluated immediately. Model formulae are defined with the tilde operator. A simple model formula looks like this: response ~ predictor Functions that accept formul...

2496 sym R (435 sym/7 pcs) 4 img

Using R for Introductory Statistics, Chapter 5

23.01.2011

Any good stats book has to cover a bit of basic probability. That’s the purpose of Chapter 5 of Using R for Introductory Statistics, starting with a few definitions: Random variable A random number drawn from a population. A random variable is a variable for which we define a range of possible values and a probability distribution. The probabi...

5155 sym R (1587 sym/9 pcs) 20 img

Annotated source code

01.02.2011

We programmers are told that reading code is a good idea. It may be good for you, but it’s hard work. Jeremy Ashkenas has come up with a simple tool that makes it easier: docco. Ashkenas is also behind underscore.js and coffeescript, a dialect of javascript in which docco is written. Interesting ways to mix prose and code have appealed to me e...

3726 sym 4 img

Using R for Introductory Statistics, Chapter 5, Probability Distributions

09.02.2011

In Chapter 5 of Using R for Introductory Statistics we get a brief introduction to probability and, as part of that, a few common probability distributions. Specifically, the normal, binomial, exponential and lognormal distributions make an appearance. For each distribution, R provides four functions whose names start with the letters d, p, q or ...

3472 sym R (503 sym/3 pcs) 10 img 1 tbl