Publications by Ralph
Investigation the relationship between two variables using a scatter plot
The relationship between two variables can be visually represented using a scatter plot and will provide some insight into the correlation between the variables and possible models to describe the relationship. There are different ways to produce scatter plots in R making use of either the base graphics system, the lattice graphics library, ggplo...
1870 sym R (380 sym/2 pcs) 4 img
Creating scatter plots using ggplot2
The ggplot2 package can be used as an alternative to lattice for producing high quality graphics in R. The package provides a framework and hopefully simple interface to producing graphs and is inspired by the grammar of graphics. The main function for producing graphs in this package is qplot, which stands for quick plot. The first two arguments...
2631 sym R (234 sym/4 pcs) 8 img
Using Faceting in ggplot2 to create Trellis-like Plots
One of the main strengths of the Trellis graphics paradigm is the use of panelling to divide data into subsets to investigate whether patterns are consistent as the conditioning variables change. In the ggplot2 package the terminology for specifying these separate panels is faceting and can be used to create similar displays. In our previous post...
1720 sym R (120 sym/2 pcs) 4 img
Graph Examples from Visualizing Data by William Cleveland
The trellis graphics approach was pioneered by various statistical researchers and the ideas are used extensively in the book “Visualizing Data” by William Cleveland. There are various resources on the website for trellis graphics including S code for creating the majority of the graphs that appear in the book. Inspired by efforts on the Lear...
1853 sym R (402 sym/4 pcs) 8 img
Design of Experiments – Power Calculations
Prior to conducting an experiment researchers will often undertake power calculations to determine the sample size required in their work to detect a meaningful scientific effect with sufficient power. In R there are functions to calculate either a minimum sample size for a specific power for a test or the power of a test for a fixed sample size....
2822 sym R (281 sym/2 pcs)
Design of Experiments – Optimal Designs
When designing an experiment it is not always possible to generate a regular, balanced design such as a full or fractional factorial design plan. There are usually restrictions of the total number of experiments that can be undertaken or constraints on the factor settings both individually or in combination with each other. In these scenarios com...
2714 sym R (843 sym/5 pcs)
Design of Experiments – Full Factorial Designs
In designs where there are multiple factors, all with a discrete group of level settings, the full enumeration of all combinations of factor levels is referred to as a full factorial design. As the number of factors increases, potentially along with the settings for the factors, the total number of experimental units increases rapidly. In many ca...
1599 sym R (628 sym/4 pcs)
Design of Experiments – Blocking and Full Factorial Experimental Design Plans
When considering using a full factorial experimental design there may be constraints on the number of experiments that can be run during a particular session, or there may be other practical constraints that introduce systematic differences into an experiment that can be handled during the design and analysis of the data collected during the expe...
2509 sym R (231 sym/2 pcs)
Summarising data using bar charts
A bar graph is a frequently used type of display that compares counts, frequencies, totals or other summary measures for a series of categories, e.g. sales in different market sectors or in quarters in a financial year. The bar graph can be laid out with the categories either on the vertical or horizontal axis of the display – depending on whet...
3915 sym R (732 sym/4 pcs) 6 img
The Grammar of Graphics: ggplot2 package
The grammar of graphics approach to constructing graphs has been implemented in the ggplot2 package in R. The author of the package, Hadley Wickham, has provided a website with many details of using the system to create nice looking graphics. The package removes many of the awkward parts of setting up graphical display that characterise other app...
808 sym