This edition first published 2020
© 2020 John Wiley & Sons Ltd
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by law. Advice on how to obtain permission to reuse material from this title is available at http://www.wiley.com/go/permissions.
The right of Dieter Rasch, Rob Verdooren and Jürgen Pilz to be identified as the authors of this work has been asserted in accordance with law.
Registered Offices
John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, USA
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, UK
Editorial Office
9600 Garsington Road, Oxford, OX4 2DQ, UK
For details of our global editorial offices, customer services, and more information about Wiley products visit us at www.wiley.com.
Wiley also publishes its books in a variety of electronic formats and by print‐on‐demand. Some content that appears in standard print versions of this book may not be available in other formats.
Limit of Liability/Disclaimer of Warranty
While the publisher and authors have used their best efforts in preparing this work, they make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives, written sales materials or promotional statements for this work. The fact that an organization, website, or product is referred to in this work as a citation and/or potential source of further information does not mean that the publisher and authors endorse the information or services the organization, website, or product may provide or recommendations it may make. This work is sold with the understanding that the publisher is not engaged in rendering professional services. The advice and strategies contained herein may not be suitable for your situation. You should consult with a specialist where appropriate. Further, readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read. Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
Library of Congress Cataloging‐in‐Publication Data
Names: Rasch, Dieter, author. | Verdooren, L. R., author. | Pilz, Jürgen,
1951- author.
Title: Applied statistics : theory and problem solutions with R / Dieter
Rasch (Rostock, GM), Rob Verdooren, Jürgen Pilz.
Description: Hoboken, NJ : Wiley, 2020. | Includes bibliographical references
and index. |
Identifiers: LCCN 2019016568 (print) | LCCN 2019017761 (ebook) | ISBN
9781119551553 (Adobe PDF) | ISBN 9781119551546 (ePub) | ISBN 9781119551522
(hardcover)
Subjects: LCSH: Mathematical statistics-Problems, exercises, etc. | R
(Computer program language)
Classification: LCC QA276 (ebook) | LCC QA276 .R3668 2019 (print) | DDC
519.5-dc23
LC record available at https://lccn.loc.gov/2019016568
Cover design: Wiley
Cover Images: © Dieter Rasch, © whiteMocca/Shutterstock
We wrote this book for people that have to apply statistical methods in their research but whose main interest is not in theorems and proofs. Because of such an approach, our aim is not to provide the detailed theoretical background of statistical procedures. While mathematical statistics as a branch of mathematics includes definitions as well as theorems and their proofs, applied statistics gives hints for the application of the results of mathematical statistics.
Sometimes applied statistics uses simulation results in place of results from theorems. An example is that the normality assumption needed for many theorems in mathematical statistics can be neglected in applications for location parameters such as the expectation, see for this Rasch and Tiku (1985). Nearly all statistical tests and confidence estimations for expectations have been shown by simulations to be very robust against the violation of the normality assumption needed to prove corresponding theorems.
We gave the present book an analogous structure to that of Rasch and Schott (2018) so that the reader can easily find the corresponding theoretical background there. Chapter 11 ‘Generalised Linear Models’ and Chapter 12 ‘Spatial Statistics’ of the present book have no prototype in Rasch and Schott (2018). Further, the present book contains no exercises; lecturers can either use the exercises (with solutions in the appendix) in Rasch and Schott (2018) or the exercises in the problems mentioned below.
Instead, our aim was to demonstrate the theory presented in Rasch and Schott (2018) and that underlying the new Chapters 11 and 12 using functions and procedures available in the statistical programming system R, which has become the golden standard when it comes to statistical computing.
Within the text, the reader finds often the sequence problem – solution – example with problems numbered within the chapters. Readers interested only in special applications in many cases may find the corresponding procedure in the list of problems in Appendix A.
We thank Alison Oliver (Wiley, Oxford) and Mustaq Ahamed (Wiley) for their assistance in publishing this book.
We are very interested in the comments of readers. Please contact:
d_rasch@t‐online.de, l.r.verdooren@hetnet.nl, juergen.pilz@aau.at.
Rostock, Wageningen, and Klagenfurt, June 2019, the authors.
In this chapter we give an overview of the software package R and introduce basic knowledge about random variables and sampling procedures.
In practical investigations, professional statistical software is used to design experiments or to analyse data already collected. We apply here the software package R. Anybody can extend the functionality of R without any restrictions using free software tools; moreover, it is also possible to implement special statistical methods as well as certain procedures of C and FORTRAN. Such tools are offered on the internet in standardised archives. The most popular archive is probably CRAN (Comprehensive R Archive Network), a server net that is supervised by the R Development Core Team. This net also offers the package OPDOE (optimal design of experiments), which was thoroughly described in Rasch et al. (2011). Further it offers the following packages used in this book: car, lme4, DunnettTests, VCA, lmerTest, mvtnorm, seqtest, faraway, MASS, glm2, geoR, gstat
.
Apart from only a few exceptions, R contains implementations for all statistical methods concerning analysis, evaluation, and planning. We refer for details to Crawley (2013).
The software package R is available free of charge from http://cran.r‐project.org for the operating systems Linux, MacOS X, and Windows. The installation under Microsoft Windows takes place via ‘Windows’. Choosing ‘base’ the installation platform is reached. Using ‘Download R 2.X.X for Windows’ (X stands for the required version number) the setup file can be downloaded. After this file is started the setup assistant runs through the installation steps. In this book, all standard settings are adopted. The interested reader will find more information about R at http://www.r‐project.org or in Crawley (2013).
After starting R the input window will be opened, presenting the red coloured input request: ‘>
’. Here commands can be written up and carried out by pressing the enter button. The output is given directly below the command line. However, the user can also realise line changes as well as line indents for increasing clarity. Not all this influences the functional procedure. A command to read for instance data y = (1, 3, 8, 11) is as follows:
> y <- c(1,3,8,11)
The assignment operator in R is the two‐character sequence ‘<-
’ or ‘=
’.
The Workspace is a special working environment in R. There, certain objects can be stored that were obtained during the current work with R. Such objects contain the results of computations and data sets. A Workspace is loaded using the menu
File – Load Workspace...
In this book the R‐commands start with >
. Readers who like to use R‐commands must only type or copy the text after >
into the R‐window.
An advantage of R is that, as with other statistical packages like SAS and IBM‐SPSS, we no longer need an appendix with tables in statistical books. Often tables of the density or distribution function of the standard normal distribution appear in such appendices. However, the values can be easily calculated using R.
The notation of this and the following chapters is just that of Rasch and Schott (2018).
Even if we, in this book, we mainly discuss how to plan experiments and to analyse observed data, we still need basic knowledge about random variables because, without this, we could not explain unbiased estimators or the expected length of a confidence interval or how to define the risks of a statistical tests.