Blog Archives

Working with themes in Lattice Graphics

April 12, 2010
By
Working with themes in Lattice Graphics

The Trellis graphics approach provides facilities for creating effective graphs with a consistent look and feel and one of the good things about the system is the use of themes to define the colour, size and other features of the components that make up a graph. The lattice package in R is an implementation of

Read more »

Summarising data using histograms

April 11, 2010
By
Summarising data using histograms

The histogram is a standard type of graphic used to summarise univariate data where the range of values in the data set is divided into regions and a bar (usually vertical) is plotted in each of these regions with height proportional to the frequency of observations in that region. In some cases the proportion of

Read more »

Summarising data using dot plots

March 26, 2010
By
Summarising data using dot plots

A dot plot is a type of display that compares counts, frequencies, totals or other summary measures for a series of categories. The dot plot can be arranged with the categories either on the vertical or horizontal axis of the display to allow comparising between the different categories as well as comparison within categories where

Read more »

Measuring the length of time to run a function

March 16, 2010
By

When writing R code it is useful to be able to assess the amount of time that a particular function takes to run. We might be interested in measuring the increase in time required by our function as the size of the data increases. To illustrate using the system.time function to calculate the time taken to

Read more »

Contingency Tables – Fisher’s Exact Test

March 6, 2010
By

A contingency table is used in statistics to provide a tabular summary of categorical data and the cells in the table are the number of occassions that a particular combination of variables occur together in a set of data. The relationship between variables in a contingency table are often investigated using Chi-squared tests. The simplest contingency

Read more »

Design of Experiments – Block Designs

February 20, 2010
By
Design of Experiments – Block Designs

In many experiments where the investigator is comparing a set of treatments there is the possibility of one or more sources of variability in the experimental measurements that can be accounted for during the design stage of the experimentation. For example we might be investigating four different pieces of machinery using say two different operators,

Read more »

Two-way Analysis of Variance (ANOVA)

February 15, 2010
By
Two-way Analysis of Variance (ANOVA)

The analysis of variance (ANOVA) model can be extended from making a comparison between multiple groups to take into account additional factors in an experiment. The simplest extension is from one-way to two-way ANOVA where a second factor is included in the model as well as a potential interaction between the two factors. As an example

Read more »

One-way ANOVA (cont.)

February 12, 2010
By
One-way ANOVA (cont.)

In a previous post we considered using R to fit one-way ANOVA models to data. In this post we consider a few additional ways that we can look at the analysis. In the analysis we made use of the linear model function lm and the analysis could be conducted using the aov function. The code used

Read more »

One-way Analysis of Variance (ANOVA)

February 3, 2010
By
One-way Analysis of Variance (ANOVA)

Analysis of Variance (ANOVA) is a commonly used statistical technique for investigating data by comparing the means of subsets of the data. The base case is the one-way ANOVA which is an extension of two-sample t test for independent groups covering situations where there are more than two groups being compared. In one-way ANOVA the data

Read more »

Codecogs – Open-Source library of numerical components

January 8, 2010
By

The Codecogs website provides an Open-source library of functions for numerical analysis. One interesting component available on the website is the LaTeX equation editor which can be used to create graphics files of equations to include on webpages. The webpage describe this component as a A web-based LaTeX equation editor that generates graphical images and HTML

Read more »