Posts Tagged ‘ lattice ’

Day #27 A lot of graphics in one place

April 20, 2011
By

assignment in R Today my internship-promotor gave me the assignment to create this chart in R. This means: I get a lot of data and put a certain column on a barchart for each plate. On top of that data, you place 2 errorbars. At first I thought, piece ...

Read more »

Alpha shapes with R and lattice

Alpha shapes with R and lattice

What are the alpha shapes?: “The concept of alpha shapes formalizes the intuitive notion of “shape” for spatial point set data, which occurs frequently in the computational sciences. An alpha shape is a concrete geometric object that is uniquely defined for a particular point set. Alpha shapes are generalizations of the convex hull. Given a

Read more »

How to display scatter plot matrices with R and lattice

How to display scatter plot matrices with R and lattice

In lattice, there is a function called splom for the display of scatter plot matrices. For large datasets, the panel.hexbinplot from the hexbin package is a better option than the default panel. As an example, let’s use some meteorological data from MAPA-SIAR: library(solaR) library(hexbin) aranjuez <- readMAPA(prov=28, est=3, start='01/01/2004', end='31/12/2010') aranjuezDF <- subset(as.data.frame(getData(aranjuez)), select=c('TempMedia', 'TempMax',

Read more »

Five ways to visualize your pairwise comparisons

March 5, 2011
By
Five ways to visualize your pairwise comparisons

In data analysis it is often nice to look at all pairwise combinations of continuous variables in scatterplots. Up until recently, I have used the function splom in the package lattice, but ggplot2 has superior aesthetics, I think anyway.Here a fe...

Read more »

Confidence bands with lattice and R

December 10, 2010
By
Confidence bands with lattice and R

If you use lattice with R, and you need to plot confidence limits in your graphic, then panel.smoother and panel.quantile from latticeExtra will help you with this task. These functions internally calculate the error bounds and use panel.polygon from lattice. If you need to plot your own confidence limits, then you have to define a

Read more »

Creating surface plots

May 28, 2010
By
Creating surface plots

A 3d wireframe plot is a type of graph that is used to display a surface – geographic data is an example of where this type of graph would be used or it could be used to display a fitted model with more than one explanatory variable. These plots are related to contour plots which

Read more »

Displaying data using level plots

May 3, 2010
By
Displaying data using level plots

A level plot is a type of graph that is used to display a surface in two rather than three dimensions – the surface is viewed from above as if we were looking straight down and is an alternative to a contour plot – geographic data is an example of where this type of graph

Read more »

Analysis of Covariance – Extending Simple Linear Regression

April 28, 2010
By
Analysis of Covariance – Extending Simple Linear Regression

The simple linear regression model considers the relationship between two variables and in many cases more information will be available that can be used to extend the model. For example, there might be a categorical variable (sometimes known as a covariate) that can be used to divide the data set to fit a separate linear

Read more »

Summarising data using box and whisker plots

April 25, 2010
By
Summarising data using box and whisker plots

A box and whisker plot is a type of graphical display that can be used to summarise a set of data based on the five number summary of this data. The summary statistics used to create a box and whisker plot are the median of the data, the lower and upper quartiles (25% and 75%)

Read more »

Simple Linear Regression

April 23, 2010
By
Simple Linear Regression

One of the most frequent used techniques in statistics is linear regression where we investigate the potential relationship between a variable of interest (often called the response variable but there are many other names in use) and a set of one of more variables (known as the independent variables or some other term). Unsurprisingly there

Read more »