# LaTex

### Introduction to Beamer

September 17, 2011 |

A friend of mine, who is quite smart by the way (she is a PhD. student in Physics at Cambridge), recently asked me for some help with Beamer. Well most of my knowledge and code came from Utkarsh when I had started about a year ago. Initially, I ha...

### Scatter plots with images

September 4, 2011 |

Edward Tufte has written extensively on the presentation of data covering good and bad practice. He has made a number of suggestions for adaptations of regularly used graph types to assist with the interpretation and understanding of data. One idea for enhancing scatter plots covered in Tufte’s book Beautiful ... [Read more...]

### The foundations of Statistics: a simulation-based approach

July 11, 2011 |

“We have seen that a perfect correlation is perfectly linear, so an imperfect correlation will be `imperfectly linear’.” page 128 This book has been written by two linguists, Shravan Vasishth and Michael Broe, in order to teach statistics “in  areas that are traditionally not mathematically demanding” at a deeper level than ... [Read more...]

### Makefiles and Sweave

May 12, 2011 |

A Makefile is a simple text file that controls compilation of a target file. The key benefit of using Makefile is that it uses file time stamps to determine if a particular action is needed. In this post we discuss how to use a simple Makefile that compiles a tex ... [Read more...]

### Produce Authentic Math Formulas in R Graphics

April 30, 2011 |

I remember a few weeks ago, there was a challenge in the R-help list to make the prime symbol in R graphics. In LaTeX, we simply write $X'$ or $X^\prime$. R has a rough support for math expressions (see demo(plotmath)) and they are certainly unsatisfactory for LaTeX users. ... [Read more...]

### Exporting R graphics as LaTeX code – version 0.6.1 of the tikzDevice package is out

April 17, 2011 |

(Guest post on R-bloggers by Charlie Sharpsteen) Cameron and I are pleased to announce version 0.6.0 of the tikzDevice package which should be available shortly at your local [Read more...]

### Code: extended model support for mtable

March 22, 2011 |

I finally got around to organizing and packaging my complete set of extended model support for mtable in Martin Elff’s memisc library. Here is a list of the models supported: coxph, survreg – Cox proportional hazards models and parametric survival … Continue reading → [Read more...]

### Code: LaTeX tables for lme4 models

March 13, 2011 |

I have recently discovered memisc, an extremely useful R package by Martin Elff (see his memisc page here). The package contains any number of useful functions, and is particularly good at helping one manage and recode survey data. However, by far my … Continue reading → [Read more...]

### R Workflow

December 7, 2010 |

When working with R you end up using a large number of datasets, packages, functions, objects, output files, workspaces, etc.  It can get a bit overwhelming trying to keep everything organized.  That is why a consistent, well-organized workf...

### Sorting out Sweave in Eclipse/StatET

November 29, 2010 |

Using Sweave to produce pretty-looking documentation for R is awfully handy. It takes a little tweaking to get set up in Eclipse and StatET though. I followed the information in Jeromy Anglim’s webpage to originally get Sweave set up. The followi... [Read more...]

### Sweave Tutorial 1: Using Sweave, R, and Make to Generate a PDF of Multiple Choice Questions

November 26, 2010 |

In this post I present an example of using Sweave to prepare a PDF of formatted multiple choice questions.More broadly the example shows how to use Sweave to incorporate elements of a databaseinto a formatted LaTeX document.It aims to be useful to any...

### Robust adaptive Metropolis algorithm [arXiv:10114381]

November 23, 2010 |

Matti Vihola has posted a new paper on arXiv about adaptive (random walk) Metropolis-Hastings algorithms. The update in the (lower diagonal) scale matrix is where is the current acceptance probability and the target acceptance rate; is the current random noise for the proposal, ; is a step size sequence decaying to ... [Read more...]

### Animated plots in R and LaTeX

October 12, 2010 |

I like to use animated plots in my talks on functional time series, partly because it is the only way to really see what is going on with changes in the shapes of curves over time, and also because audiences love them! Here is how it is done. For LaTeX, ...

### Export R data to tex code

October 12, 2010 |

We often use Gnu R to work on different things and to solve various exercises. It's always a disgusting job to export e.g. a matrix with probabilities to a LaTeX document to send it to our supervisors, but Rumpel just gave me a little hint. [Read more...]

### Creating a Presentation with LaTeX Beamer – Including Images from Graphics Files

August 7, 2010 |

It will often be more efficient to generate graphics in an external software package and then include these files in a LaTeX beamer presentation. The standard LaTeX approach to including graphics can be utilised to perform this task. Fast Tube by Casper The graphicx is useful for including graphics files ...

### Creating a Presentation with LaTeX Beamer – Equations and tikz

July 23, 2010 |

Many presentations created using LaTeX beamer included mathematical equations and these can be easily included in a presentation and in this post we will consider using the tikz package to add various interesting elements to equations, such as lines between text on a slide and part of an equation. Fast ...

### Creating a Presentation with LaTeX Beamer – Boxes

July 19, 2010 |

We can add coloured boxes with text or mathematics into a LaTeX beamer presentation which is particularly useful if we have definitions, theorem or computer code to highlight this information that may not be so accessible within a paragraph of text. Fast Tube by Casper The easiest way to create ...

### More StackExchange sites

July 16, 2010 |

The StackExchange site on Statistical Analysis is about to go into private beta testing. This is your last chance to commit if you want to be part of the private beta testing. Don’t worry if you miss out — it will only be a week before it is then open ...

### Creating a Presentation with LaTeX Beamer – Tables

July 14, 2010 |

Tables of information can be included in a LaTeX beamer presentation in the same way that they would be incorporated into any other LaTeX document. The tabular environment is used and, if necessary, the tables could be numbered but this probably doesn’t make as much sense as labelling and ...