Example: confidence

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.

Learning Statistics with R covers the contents of an introductory statistics class, as typically taught to undergraduate psychology students, focusing on the use of the R statistical software. The book discusses how to get started in R as well as giving an introduction to data manipulation and writing scripts. From

Tags:

  Statistics, Introductory, Introductory 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 .. 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.

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

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

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

6 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 .. 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.. Assumptions of regression .. Model checking .. Model selection .. Summary.

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

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

9 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. This time around, the update has focused almost entirely on the theorysections of the book. Chapters 9, 10 and 11 have been rewritten, hopefully for the better. Along the samelines, Chapter 17 is entirely new, and focuses on Bayesian Statistics . I think the changes have improvedthe book a great deal. I ve always felt uncomfortable about the fact that all the inferential Statistics inthe book are presented from an orthodox perspective, even though I almost always present Bayesian dataanalyses in my own work. Now that I ve managed to squeeze Bayesian methods into the book somewhere,I m starting to feel better about the book as a whole.

10 I wanted to get a few other things done in thisupdate, but as usual I m running into teaching deadlines, so the update has to go out the way it is!Dan NavarroixFebruary 16, 2015 Preface to Version year has gone by since I wrote the last preface. The book has changed in a few important ways:Chapters 3 and 4 do a better job of documenting some of the time saving features of Rstudio, Chapters12 and 13 now make use of new functions in the lsr package for running chi-square tests and t tests, andthe discussion of correlations has been adapted to refer to the new functions in the lsr package. The softcopy of now has better internal referencing ( , actual hyperlinks between sections), though thatwas introduced in There s a few tweaks here and there, and many typo corrections (thank you toeveryone who pointed out typos!), but overall isn t massively different from wish I d had more time over the last 12 months to add more content. The absence of any discussionof repeated measures ANOVA and mixed models more generally really does annoy me.


Related search queries