Transcription of Learning Statistics with R
1 Learning Statistics with R:A tutorial for psychology students and other beginners(Version )Danielle NavarroUniversity of New South Statistics with Rcovers the contents of an introductory Statistics class, as typically taught toundergraduate psychology students, focusing on the use of the R statistical software. The book discusseshow to get started in R as well as giving an introduction to data manipulation and writing scripts. Froma statistical perspective, the book discusses descriptive Statistics and graphing first, followed by chapterson probability theory, sampling and estimation, and null hypothesis testing.
2 After introducing the theory,the book covers the analysis of contingency tables,t-tests, ANOVAs and regression. Bayesian statisticsare covered at the end of the book is published under a Creative Commons BY-SA license (CC BY-SA) version This meansthat this book can be reused, remixed, retained, revised and redistributed (including commercially) aslong as appropriate credit is given to the authors. If you remix, or modify the original version of thisopen textbook, you must redistribute all versions of this open textbook under the same license - book was brought to you today by the letter R.
3 IvTable of ContentsPrefaceixI Background11 Why do we learn Statistics ? the psychology of Statistics .. cautionary tale of Simpson s paradox .. in psychology .. in everyday life .. s more to research methods than Statistics ..102 A brief introduction to research to psychological measurement.. of measurement .. the reliability of a measurement .. role of variables: predictors and outcomes .. and non-experimental research.. the validity of a study.. , artifacts and other threats to validity.
4 33II An introduction toR353 Getting started .. commands at theRconsole .. simple calculations withR.. a number as a variable.. functions to do calculations .. Rstudio help you with your commands .. many numbers as a vector.. text data .. true or false data .. Indexing vectors.. QuittingR.. Summary ..704 comments.. and loading packages .. the workspace .. the file system .. and saving data .. things to know about variables.. frames .. Formulas .. Generic functions.
5 Getting help.. Summary .. 109 III Working with data1115 Descriptive of central tendency .. of variability .. and kurtosis.. an overall summary of a variable.. Statistics separately for each group.. scores .. missing values .. 1546 Drawing overview ofRgraphics .. introduction to plotting .. and leaf plots .. graphs .. image files usingRand Rstudio .. 1937 Pragmatic and cross-tabulating data .. and recoding a variable.. few more mathematical functions and operations.
6 A subset of a vector .. a subset of a data frame.. , flipping and merging data .. a data frame .. with text.. unusual data files .. Coercing data from one class to another .. Other useful data structures .. Miscellaneous topics .. Summary .. 2528 Basic .. statements .. functions .. loops .. 268IV Statistical theory2699 Introduction to are probability and Statistics different? .. does probability mean? .. probability theory.
7 Binomial distribution .. normal distribution .. useful distributions .. 29810 Estimating unknown quantities from a Samples, populations and sampling .. The law of large numbers.. Sampling distributions and the central limit theorem .. Estimating population parameters.. Estimating a confidence interval .. Summary .. 32611 Hypothesis A menagerie of hypotheses.. Two types of errors .. Test Statistics and sampling distributions.. Making decisions.
8 Thepvalue of a test .. Reporting the results of a hypothesis test.. Running the hypothesis test in practice .. Effect size, sample size and power.. Some issues to consider.. Summary .. 348V Statistical tools34912 Categorical data The 2goodness-of-fit test.. The 2test of independence (or association) .. The continuity correction.. Effect size .. Assumptions of the test(s) .. The most typical way to do chi-square tests inR.. The Fisher exact test.
9 The McNemar test .. What s the difference between McNemar and independence? .. Summary .. 378vii13 Comparing two The one-samplez-test .. The one-samplet-test.. The independent samplest-test (Student test) .. The independent samplest-test (Welch test) .. The paired-samplest-test.. One sided tests .. Using the () function .. Effect size .. Checking the normality of a sample .. Testing non-normal data with Wilcoxon tests.
10 Summary .. 42214 Comparing several means (one-way ANOVA) An illustrative data set.. How ANOVA works.. Running an ANOVA inR.. Effect size .. Multiple comparisons and post hoc tests .. Assumptions of one-way ANOVA .. Checking the homogeneity of variance assumption.. Removing the homogeneity of variance assumption .. Checking the normality assumption .. Removing the normality assumption .. On the relationship between ANOVA and the Studentttest.