ABSTRACT

This chapter gives the reader an introduction to statistical computations in base R. Although, many R functions implement specific statistical procedures for model fitting or summaries, they use a consistent user interface. In different model fitting functions the model specification and the structure of the returned values follow a consistent approach. This approach can be considered a part of the R language. These approaches as used calculating statistical summaries, generating (pseudo-)random numbers, sampling, fitting models and carrying out tests of significance are described and exemplified. Correlation, t-test, linear models, generalized linear models, non-linear models, splines, some simple multivariate methods and time series are used as examples. The aim is teaching how to specify models, contrasts and the data used, and how to access different components of the objects returned by the corresponding fit and summary functions.