\chapter*{Preface} This mini-book attempts to provide a general introduction to the statistics side of structural brain imaging, with a heavy emphasis on practical worked examples. It also introduces a particular toolkit, RMINC, designed to make running these types of statistical analyses easier. It is targeted at the general user, who may or may not have some statistical background, but does have some data they want analysed in a straightforward way. It is not meant to be a complete handbook on statistics, but hopefully will provide enough of a primer to get by, at least for a little while. This mini-book exists for a number of reasons. I have over the years been asked multiple questions relating to structural brain imaging and statistics, and have had the chance to learn answers to those questions from countless people. This book thus exists as an attempt to put some of those answers down on paper. Secondly, writing this book is part and parcel of the development of RMINC; it is easier to write code useable by others if one documents it first, and then writes code to fit the documentation. The book will likely be an incomplete work in progress for a long while yet. The \LaTeX source for this book are packaged along with RMINC itself, and contributors are most welcome! \tableofcontents %\listoffigures %\listoftables \chapter{Introduction} The process of analysing brain imaging data is typically comprised of a series of stages. The study is designed with various choices made about the biology question that is to be addressed and the data necessary to answer the questions thus posed. Then the data is then acquired, and once that is completed, the images are processed in various automatic, semi-automatic, or manual ways and then analysed. This book deals mainly with the final part, the data analysis, though there will be several side-tracks into the other topics. A single example will be used throughout: a mouse brain imaging study comparing male to female mouse brains. The methods described herein should be easily transferable to any other structural imaging study which looks at brain shape, tissue classification, or signal intensities. \section{Installing the tools} All the analyses will be performed using RMINC, which is a library designed to handle MINC\index{MINC} volumes inside the R\index{R} statistical environment. All the tools needed are freely available, and should run on just about any computer/operating system. Installation and setup is described in some more detail below. \subsection{R} Quick background about R. Installing R. Where to find further reading. \subsection{MINC} Quick background about MINC. In order for RMINC to work, the MINC libraries have to be compiled as shared libraries. When configuring, make sure the following flag is added on: \begin{verbatim} ./configure --enable-shared=yes \end{verbatim} Where to find more information. \subsection{RMINC} Quick background about RMINC. Installing RMINC. \section{Overview of the analysis process} The data analysis process usually proceeds in the following way. First the input images are assessed for correctness; any obvious processing errors are removed from any subsequent analyses. The question of what constitutes an outlier is often a tricky one. In order to avoid the temptation to manipulate the data in a biased way it is best if the person who reviews the input data is blind about the categorization of each particular dataset. Once all the acceptable datasets are in place a series of descriptive statistics can be generated, usually consisting of means and standard deviations of all images in the study as well as of all the subgroupings. This is followed by generating statistical maps of the main variables of interest. These are then thresholded for significance while taking multiple comparisons into account. There is then often a series of steps in which new statistical models are analyzed and thresholded until the results become more understandable. This usually involves lots of plotting of individual datapoints. % This book will cover those topics in turn in the following % chapters. Chapter \ref{chp:input} describes the prepartion of the data % for analysis, chapter \ref{chp:descriptive} shows how to run % descriptive statistics, chapter \ref{chp:group} talks about performing % group comparisons and ANOVAs, chapter \ref{chp:ancova} gets into the topic of % correlations, regressions, and ANCOVAs, chapter \ref{chp:multiple} % addresses the issue of multiple comparisons, and chapter % \ref{chp:plotting} describes how to plot individual datapoints. \section{Data used throughout this book} This book will consistently work with one dataset consisting of 5 male and 5 female C57Bl/6 mice, taken from a larger dataset published in a 2007 NeuroImage paper by Spring et al. The mice, all 12 weeks old, were scanned using an overnight T2-weighted FSE sequence, then all aligned into a common space using an automated image registration algorithm (i.e. deformation based morphometry). The final metric of interest was then the Jacobian determinant of the deformations needed to align each mouse to the final common atlas. These details are relatively unimportant for this book - the input might as well be voxel density maps from VBM - but at least it gives some background for those who care. If you want to follow along with the examples used in this book you can download the data at \url{http://launchpad.net/rminc}. Note that the data has been downsampled to 120 micron voxels (from the original 32 micron voxels) to keep the download within reasonable limits.