Statistical Computing with "R" (Theory and Lab) - SAM014-2021
SAM014
CENTRAL UNIVERSITY OF TAMIL NADU, THIRUVARUR
SCHOOL OF MATHEMATICS AND COMPUTER SCIENCES
DEPARTMENT OF STATISTICS AND APPLIED MATHEMATICS(SAM)
M.Sc. STATISTICS AND APPLIED MATHEMATICS
SAM014 - STATISTICAL COMPUTING WITH "R" -THEORY & LAB 4 Credits
UNIT I: Introduction to R - A programming language and environment for data analysis and graphics. Syntax of R expressions: Vectors and assignment, vector arithmetic, generating regular sequence, logical vector, character vectors, Index vectors; selecting and modifying subsets of data set, Data objects: Basic data objects, matrices, partition of matrices, arrays, lists, factors and ordered factors, creating and using these objects; Functions- Elementary functions and summary functions, applying functions to subsets of data. (15L)
UNIT II: Data frames: The benefits of data frames, creating data frames, combining data frames, Adding new classes of variables to data frames; Data frame attributes. Importing data files: import.data function, read. table function; Exporting data: export.data function, cat, write, and write. table functions; Outputting results - sink function, formatting output - options, and format functions; Exporting graphs - export. graph function. (15L)
UNIT III: Random numbers from various distributions like uniform, Normal, gamma, exponential, beta, F, poisson, binomial, etc Graphics in R: creating graphs using plot function, box plot, histogram, line plot, stem and leaf plot, pie chart, bar chart multiple plot layout, plot titles, formatting plot axes. Interactively adding information of plot - Identifying the plotted points, adding trend lines to current scatter plot, adding new data to current plot, adding text and legend. (15L)
UNIT IV: Loops and conditional statements: Control Statements; if statement, if else Statement. Looping statement; for loop, repeat, while loop Developing simple programs in R for data analysis tasks, saving programs, executing stored programs, defining a new binary operator, assignment within function, more advanced examples, object oriented programme. Creating function libraries- library function, attaching and detaching the libraries. (15L)
References:
1. J.M. Chambers, Programming with Data: A guide to S language,Springer,1998.
2. W. N. Venables and B. D. Ripley, S Programming, Springer, 2000.
3. B. S. Everitt, A handbook of Statistical Analysis using S-Plus, Chapman & Hall, 1994.
4. P. Dalgaard, Statistics and computing: Introductory Statistics with R, Springer, 2002.
5. J. Maindonald and J. Braum, Data Analysis and Graphics Using R: An example-based approach Second Edition, Cambridge Series in Statistical and Probabilistic Mathematics, 2007.