Front Matter
[chapter]
2012
The R Book
Preface xxiii 1 Getting Started 2 Essentials of the R Language 3 Data Input 4 Dataframes 5 Graphics 6 Tables 7 Mathematics 8 Classical Tests 9 Statistical Modelling 10 Regression 11 Analysis of Variance 12 Analysis of Covariance 13 Generalized Linear Models 14 Count Data 15 Count Data in Tables 16 Proportion Data 17 Binary Response Variables 18 Generalized Additive Models 19 Mixed-Effects Models 20 Non-Linear Regression 21 Meta-Analysis 22 Bayesian Statistics vi CHAPTERS 23 Tree Models 24 Time
more »
... eries Analysis 25 Multivariate Statistics 26 Spatial Statistics 27 Survival Analysis 28 Simulation Models 29 Changing the Look of Graphics References and Further Reading Index Detailed Contents Preface xxiii 1 Getting Started 1.1 How to use this book 1.1.1 Beginner in both computing and statistics 1.1.2 Student needing help with project work 1.1.3 Done some R and some statistics, but keen to learn more of both 1.1.4 Done regression and ANOVA, but want to learn more advanced statistical modelling 1.1.5 Experienced in statistics, but a beginner in R 1.1.6 Experienced in computing, but a beginner in R 1.1.7 Familiar with statistics and computing, but need a friendly reference manual 1.2 Installing R 1.3 Running R 1.4 The Comprehensive R Archive Network 1.4.1 Manuals 1.4.2 Frequently asked questions 1.4.3 Contributed documentation 1.5 Getting help in R 1.5.1 Worked examples of functions 1.5.2 Demonstrations of R functions 1.6 Packages in R 1.6.1 Contents of packages 1.6.2 Installing packages 1.7 Command line versus scripts 1.8 Data editor 1.9 Changing the look of the R screen 1.10 Good housekeeping 1.11 Linking to other computer languages 2 Essentials of the R Language 2.1 Calculations 2.1.1 Complex numbers in R 2.1.2 Rounding 2.1.3 Arithmetic 2.1.4 Modulo and integer quotients viii DETAILED CONTENTS 2.1.5 Variable names and assignment 2.1.6 Operators 2.1.7 Integers 2.1.8 Factors 2.2 Logical operations 2.2.1 TRUE and T with FALSE and F 2.2.2 Testing for equality with real numbers 2.2.3 Equality of floating point numbers using all.equal 2.2.4 Summarizing differences between objects using all.equal 2.2.5 Evaluation of combinations of TRUE and FALSE 2.2.6 Logical arithmetic 2.3 Generating sequences 2.3.1 Generating repeats 2.3.2 Generating factor levels 2.4 Membership: Testing and coercing in R 2.5 Missing values, infinity and things that are not numbers 2.5.1 Missing values: NA 2.6 Vectors and subscripts 2.6.1 Extracting elements of a vector using subscripts 2.6.2 Classes of vector 2.6.3 Naming elements within vectors 2.6.4 Working with logical subscripts 2.7 Vector functions 2.7.1 Obtaining tables of means using tapply 2.7.2 The aggregate function for grouped summary statistics 2.7.3 Parallel minima and maxima: pmin and pmax 2.7.4 Summary information from vectors by groups 2.7.5 Addresses within vectors 2.7.6 Finding closest values 2.7.7 Sorting, ranking and ordering 2.7.8 Understanding the difference between unique and duplicated 2.7.9 Looking for runs of numbers within vectors 2.7.10 Sets: union, intersect and setdiff 2.8 Matrices and arrays 2.8.1 Matrices 2.8.2 Naming the rows and columns of matrices 2.8.3 Calculations on rows or columns of the matrix 2.8.4 Adding rows and columns to the matrix 2.8.5 The sweep function 2.8.6 Applying functions with apply, sapply and lapply 2.8.7 Using the max.col function 2.8.8 Restructuring a multi-dimensional array using aperm 2.9 Random numbers, sampling and shuffling 2.9.1 The sample function 2.10 Loops and repeats 2.10.1 Creating the binary representation of a number 2.10.2 Loop avoidance 6 Tables 6.1 Tables of counts 6.2 Summary tables 6.3 Expanding a table into a dataframe 6.4 Converting from a dataframe to a table 6.5 Calculating tables of proportions with prop.table 6.6 The scale function 6.7 The expand.grid function 6.8 The model.matrix function 6.9 Comparing table and tabulate 7 Mathematics 7.1 Mathematical functions 7.1.1 Logarithmic functions 7.1.2 Trigonometric functions 7.1.3 Power laws 7.1.4 Polynomial functions 7.1.5 Gamma function 7.1.6 Asymptotic functions 7.1.7 Parameter estimation in asymptotic functions 7.1.8 Sigmoid (S-shaped) functions 7.1.9 Biexponential model 7.1.10 Transformations of the response and explanatory variables 7.2 Probability functions 7.3 Continuous probability distributions 7.3.1 Normal distribution 7.3.2 The central limit theorem 7.3.3 Maximum likelihood with the normal distribution 7.3.4 Generating random numbers with exact mean and standard deviation 7.3.5 Comparing data with a normal distribution 7.3.6 Other distributions used in hypothesis testing 7.3.7 The chi-squared distribution 7.3.8 Fisher's F distribution 7.3.9 Student's t distribution 7.3.10 The gamma distribution 7.3.11 The exponential distribution 7.3.12 The beta distribution 7.3.13 The Cauchy distribution 7.3.14 The lognormal distribution 7.3.15 The logistic distribution 7.3.16 The log-logistic distribution DETAILED CONTENTS xiii 7.3.17 The Weibull distribution 7.3.18 Multivariate normal distribution 7.3.19 The uniform distribution 7.3.20 Plotting empirical cumulative distribution functions 7.4 Discrete probability distributions 7.4.1 The Bernoulli distribution 7.4.2 The binomial distribution 7.4.3 The geometric distribution 7.4.4 The hypergeometric distribution 7.4.5 The multinomial distribution 7.4.6 The Poisson distribution 7.4.7 The negative binomial distribution 7.4.8 The Wilcoxon rank-sum statistic 7.5 Matrix algebra 7.5.1 Matrix multiplication 7.5.2 Diagonals of matrices 7.5.3 Determinant 7.5.4 Inverse of a matrix 7.5.5 Eigenvalues and eigenvectors 7.5.6 Matrices in statistical models 7.5.7 Statistical models in matrix notation 7.6 Solving systems of linear equations using matrices 7.7 Calculus 7.7.1 Derivatives 7.7.2 Integrals 7.7.3 Differential equations 8 Classical Tests 8.1 Single samples 8.1.1 Data summary 8.1.2 Plots for testing normality 8.1.3 Testing for normality 8.1.4 An example of single-sample data 8.2 Bootstrap in hypothesis testing 8.3 Skew and kurtosis 8.3.1 Skew 8.3.2 Kurtosis 8.4 Two samples 8.4.1 Comparing two variances 8.4.2 Comparing two means 8.4.3 Student's t test 8.4.4 Wilcoxon rank-sum test 8.5 Tests on paired samples 8.6 The sign test 8.7 Binomial test to compare two proportions 8.8 Chi-squared contingency tables 8.8.1 Pearson's chi-squared 8.8.2 G test of contingency xiv DETAILED CONTENTS 8.8.3 Unequal probabilities in the null hypothesis 8.8.4 Chi-squared tests on table objects 8.8.5 Contingency tables with small expected frequencies: Fisher's exact test 8.9 Correlation and covariance 8.9.1 Data dredging 8.9.2 Partial correlation 8.9.3 Correlation and the variance of differences between variables 8.9.4 Scale-dependent correlations 8.10 Kolmogorov-Smirnov test 8.11 Power analysis 8.12 Bootstrap 9 Statistical Modelling
doi:10.1002/9781118448908.fmatter
fatcat:fzlogmrrxngx5o76x47yi77cmi