# Posts Tagged ‘ lattice ’

## Lattice when modeling, ggplot when publishing

October 17, 2011
By

When working in research projects I tend to fit several, sometimes quite a few, alternative models. This model fitting is informed by theoretical considerations (e.g. quantitative genetics, experimental design we used, our understanding of the process under study, etc.) but … Continue reading →

## Setting plots side by side

October 11, 2011
By

This is simple example code to display side-by-side lattice plots or ggplot2 plots, using the mtcars dataset that comes with any R installation. We will display a scatterplot of miles per US gallon (mpg) on car weight (wt) next to … Continue reading →

## All combinations for levelplot

October 7, 2011
By

In a previous post I explained how to create all possible combinations of the levels of two factors using expand.grid(). Another use for this function is to create a regular grid for two variables to create a levelplot or a … Continue reading →

## Comparing Two Distributions

August 29, 2011
By

Here I compare two distributions, flowering duration of indigenous and allochtonous plant species. The hypothesis is that alien compared to indigenous plant species exhibit longer flowering periods. Read more »

## Test Difference between Two Proportions & Plot Confidence Intervals

August 11, 2011
By

..an illustrative example for testing proportions and presenting the results.the data: number of indigenous and alien plant species with and without vegetative reproduction. Hypothesis: The proportion of species with vegetative reproduction is differen...

## Lattice-xyplot without Border/Box, with Axes at Bottom & Left Side Only, with Custom Ablines/Grid & Axis-Labelling

August 4, 2011
By

Here's how you do a lattice-xyplot without border/box, with axes at bottom & left side only, with custom ablines/grid & axis-labelling Read more »

## Model Validation: Interpreting Residual Plots

July 18, 2011
By

When conducting any statistical analysis it is important to evaluate how well the model fits the data and that the data meet the assumptions of the model. There are numerous ways to do this and a variety of statistical tests to evaluate deviations from model assumptions. However, there is little general acceptance of any of the statistical tests. Generally...

## rasterVis

The raster package defines classes and methods for spatial raster data access and manipulation. The new rasterVis package complements raster providing a set of methods for enhanced visualization and interaction. It is now at CRAN. Several examples can ...

## Multiple Comparisons for GLMMs using glmer() & glht()

June 14, 2011
By

...that's an example of how to apply multiple comparisons to a generalised linear mixed model using the function glmer from package lme4 & glht() from package multcomp. By the way you see a nice example for visualizing data from a nested sampli...

## Great circles, raster, sp and lattice

Recently I found a post at FlowingData with a detailed tutorial to map connections with great circles with R. The tutorial of FlowingData is excellent, but I feel more comfortable with the sp classes and methods, and with the lattice and latticeExtra packages. Besides, I want to use the free spatial data available from the