Example: barber

Learning Statistics with R

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. 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.

Overview. Learning Statistics with R covers the contents of an introductory statistics class, as typically taught to undergraduate psychology students, focusing on …

Tags:

  Statistics

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

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. 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.

2 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 .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 ..33II An introduction toR353 Getting started .. commands at theRconsole.

3 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 .. 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.

4 And leaf plots .. graphs .. image files usingRand Rstudio .. 1937 Pragmatic and cross-tabulating data .. and recoding a variable.. few more mathematical functions and operations .. 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 .. binomial distribution .. normal distribution.

5 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 .. 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.

6 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 .. 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 .. Summary .. 42214 Comparing several means (one-way ANOVA) An illustrative data set.

7 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 .. Summary .. 45415 Linear What is a linear regression model? .. Estimating a linear regression model .. Multiple linear regression.. Quantifying the fit of the regression model .. Hypothesis tests for regression models .. Testing the significance of a correlation.. Regarding regression coefficients.

8 Assumptions of regression .. Model checking .. Model selection .. Summary .. 49516 Factorial Factorial ANOVA 1: balanced designs, no interactions .. Factorial ANOVA 2: balanced designs, interactions allowed .. Effect size, estimated means, and confidence intervals .. Assumption checking .. TheFtest as a model comparison .. ANOVA as a linear model .. Different ways to specify contrasts .. Post hoc tests .. The method of planned comparisons .. Factorial ANOVA 3: unbalanced designs .. Summary .. 551viiiVI Endings, alternatives and prospects55317 Bayesian Probabilistic reasoning by rational agents .. Bayesian hypothesis tests.. Why be a Bayesian?

9 Bayesian analysis of contingency tables.. Bayesiant-tests .. Bayesian regression .. Bayesian ANOVA.. Summary .. 58418 The undiscovered Statistics .. Learning the basics, and Learning them inR.. 595 References .. 597ixPreface to Version book hasn t changed much since 2015 when I released Version it s probably fair to say that I vechanged more than it has. I moved from Adelaide to Sydney in 2016 and my teaching profile at UNSW isdifferent to what it was at Adelaide, and I haven t really had a chance to work on it since arriving here!It s a little strange looking back at this actually. A few quick Weirdly, the bookconsistentlymisgenders me, but I suppose I have only myself to blame for thatone :-) There s now a brief footnote on page 12 that mentions this issue; in real life I ve been workingthrough a gender affirmation process for the last two years and mostly go by she/her pronouns.

10 Iam, however, just as lazy as I ever was so I haven t bothered updating the text in the book. For Version I haven t changed much I ve made a few minor changes when people have pointedout typos or other errors. In particular it s worth noting the issue associated with the etaSquaredfunction in thelsrpackage (which isn t really being maintained any more) in Section Thefunction works fine for the simple examples in the book, but there are definitely bugs in there thatI haven t found time to check! So please take care with that one. The biggest change really is the licensing! I ve released it under a Creative Commons licence (CCBY-SA , specifically), and placed all the source files to the associated GitHub repository, ifanyone wants to adapt someone would like to write a version that makes use of I hear that s becomerather important to R these days :-)Best,Danielle NavarroPreface to Version year, another update.


Related search queries