Statistics for Ecologists Using R and Excel
Statistics for Ecologists Using R and Excel
Data collection, exploration, analysis and presentation
Mark Gardener
DATA IN THE WILD SERIES
Pelagic Publishing | www.pelagicpublishing.com
Published by Pelagic Publishing www.pelagicpublishing.com PO Box 725, Exeter, EX1 9QU
Statistics for Ecologists Using R and Excel: Data collection, exploration, analysis and presentation
ISBN 978-1-78427-139-8 (Pbk)
ISBN 978-1-78427-140-4 (Hbk)
ISBN 978-1-78427-141-1 (ePub)
ISBN 978-1-78427-142-8 (mobi)
ISBN 978-1-78427-143-5 (ePDF)
Copyright 2017 Mark Gardener
All rights reserved. No part of this document may be produced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise without prior permission from the publisher.
While every effort has been made in the preparation of this book to ensure the accuracy of the information presented, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Pelagic Publishing, its agents and distributors will be held liable for any damage or loss caused or alleged to be caused directly or indirectly by this book.
Windows, Excel and Word and are trademarks of the Microsoft Corporation. For more information visit www.microsoft.com. OpenOffice.org is a trademark of Oracle. For more information visit www.openoffice.org. Apple Macintosh is a trademark of Apple Inc. For more information visit www.apple.com.
A catalogue record for this book is available from the British Library.
Cover image: Arizona Sunset istockphoto.com/tonda
About the author
Mark is an ecologist, lecturer and writer and has worked as a teacher and supervisor around the world. He runs courses in ecology, data analysis and R: the statistical programming language, for a variety of organizations.
Acknowledgements
Thanks to Nigel Massen at Pelagic Publishing for encouragement and support in the production of this new edition.
With a book of this nature data examples are always useful. Some of the data illustrated here were collected by students, and I gratefully acknowledge their efforts and send thanks for allowing me to use these data as examples.
Software used
Various versions of Microsofts Excel spreadsheet were used in the preparation of this manuscript. Most of the examples presented show version 2013 for Microsoft Windows although other versions may also be illustrated (including Excel 2010).
Several versions of the R program were used and illustrated, including 2.15.1, for Windows and 3.0.2 for Macintosh: R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org/.
Who this book is for
Students of ecology and environmental science will find this book aimed at them although many other scientists will find the text useful as the principles and data analysis are the same in many disciplines. No prior knowledge is assumed and the reader can develop their skills up to degree level.
What you will learn in this book
This is a book about the scientific process and how you apply it to data in ecology. You will learn how to plan for data collection, how to assemble data, how to analyze data and finally how to present the results. The book uses Microsoft Excel and the powerful Open Source R program to carry out data handling as well as to produce graphs. Specific topics include:
How to plan ecological projects.
How to record and assemble your data.
How to use Excel for data analysis and graphs.
How to use R for data analysis and graphs.
How to carry out a wide range of statistical analyses, including analysis of variance and regression.
How to create professional looking graphs.
How to present your results.
Whats new in the second edition?
The changes from the first edition can be summarized as follows:
Completely revised chapter on graphics. The chapter is now a one-stop resource for all graphics-related topics.
New: graph types and their uses.
New: Excel Chart Tools.
New: R graphics commands.
New: producing different chart types in Excel and in R.
More support material online, including example data, exercises and additional notes and explanations.
New: chapter on basic community statistics, biodiversity and similarity.
New: chapter summaries.
New: end of chapter exercises.
How this book is arranged
The book is broadly laid out in four sections, roughly corresponding to the topics: planning, recording, analysing and reporting. The sections are rather unequal in length, with the focus on the analysis chapters and the production of graphics.
Throughout the book you will see example exercises that are intended for you to try out. In fact they are expressly aimed at helping you on a practical level; reading how to do something is fine but you need to do it for yourself to learn it properly. The Have a Go exercises are hard to miss.
Have a Go: Learn something by doing it
The Have a Go exercises are intended to give you practical experience at various tasks, such as preparing graphs or analysing data. Many exercises will refer to supplementary data, which you can get from the companion website.
You will also see tips and notes, which will stand out from the main text. These are useful items of detail pertaining to the text but which I felt were important to highlight.
Tips and Notes: Useful additional information
At certain points in the text youll see tips and notes highlighted like this. These items contain things that I felt were important to highlight and mention especially.
At the end of each chapter there is a summary table to help give you an overview of the material in that chapter. There are also some self-assessment exercises for you to try out. The answers are in the Appendix.
Support files
Most of the examples illustrated in the text are available on the support website. You can download data files and explore additional examples and notes. In most cases youll see the following text.
Go to the website for support material.
The support website can be accessed at:
http://www.gardenersown.co.uk/Publications/
Contents
Preface to Edition 1
This is not just a statistics textbook! Although there are plenty of statistical analyses here, this book is about the processes involved in looking at data. These processes involve planning what you want to do, writing down what you found and writing up what your analyses showed. The statistics part is also in there of course but this is not a course in statistics. By the end I hope that you will have learnt some statistics but in a practical way, i.e. what statistics can do for you. In order to learn about the methods of analysis, youll use two main tools: a Microsoft Excel spreadsheet (although Open Office will work just as well) and a computer program called R. The spreadsheet will allow you to collect your data in a sensible layout and also do some basic analyses (as well as a few less basic ones). The R program will do much of the detailed statistical work (although you will also use Excel quite a bit). Both programs will be used to produce graphs. This book is not a course in computer programming; youll learn just enough about the programs to get the job done.