[R-bloggers] Likert Scale Survey: from googleform to #rstats graph (and 2 more aRticles) | |
- Likert Scale Survey: from googleform to #rstats graph
- Upcoming R courses with Jumping Rivers
- R Markdown Workshop
Likert Scale Survey: from googleform to #rstats graph Posted: 04 Aug 2019 08:40 AM PDT (This article was first published on Emma R, and kindly contributed to R-bloggers) Many Biology students are interested in science communication or the public understanding of science and undertake projects in these areas. They often conduct surveys which include Likert-scale questions. This workflow will teach you how to set up a Google Forms survey with Likert scale questions, read the responses in to R and report on the results. It uses the packages googlesheets (Bryan and Zhao, 2018) and likert (Bryer and Speerschneider, 2016). These slides take you through the process.To leave a comment for the author, please follow the link and comment on their blog: Emma R. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more... | ||||||||||||
Upcoming R courses with Jumping Rivers Posted: 04 Aug 2019 05:05 AM PDT (This article was first published on r – Jumping Rivers, and kindly contributed to R-bloggers) You'll be pleased to know that Jumping rivers are running R training courses up and down the UK, in London, Newcastle, Belfast and Edinburgh. I've put together a quick summary of the courses available through til the end of the year. They are sorted by place then date. You can find the booking links and more detail over at our courses page. Don't be afraid to get in contact if you have any questions! London12/12 – Advanced Programming in RThis is a two-day intensive course on advanced R programming. The training course will not only cover advanced R programming techniques, such as S3/S4 objects, reference classes and function closures, we will spend a significant time discussing why and where these methods are used. The course will be a mixture of lectures and computer practicals. By the end of the course, participants will be able to use OOP within there own code. Newcastle2/12 – 4/12 – Rapid reporting for analysts: An Introduction to R programming through to reporting in three daysThis course aims to take each individual through the fundamental approach to using R programming in her current role. Ensuring that the attendees build confidence on where and how to start when they get back to their desks. By the end of the course the individual should have already introduced some automation and will be working towards automating all of their reports. Our experience shows analysts who set up a reproducible report save between 20-80% time on their task Belfast2/9 – Mastering the Tidyverse (Data Carpentry)The tidyverse is essential for any statistician or data scientist who deals with data on a day-to-day basis. By focusing on small key tasks, the tidyverse suite of packages removes the pain of data manipulation. The tidyverse allows you to
This training course covers key aspects of the tidyverse, including dplyr, lubridate, tidyr, stringr and tibbles. 3/9 – Intro to RThis is a one-day intensive course on R and assumes no prior knowledge. By the end of the course, participants will be able to import, summarise and plot their data. At each step, we avoid using "magic code", and stress the importance of understanding what R is doing. Edinburgh4/10 – Intro to RSee above description 11/10 – Programming with RThe benefit of using a programming language such as R is that we can automate repetitive tasks. This course covers the fundamental techniques such as functions, for loops and conditional expressions. By the end of this course, you will understand what these techniques are and when to use them. This is a one-day intensive course on R. 18/10 – Introduction to RSee above description 25/10 – Mastering the Tidyverse (Data Carpentry)See above description 1/11 – Advanced Graphics with RThis is a one-day intensive course on advanced graphics with R. The standard plotting commands in R are known as the base graphics, but are starting to show their age. In this course, we cover more advanced graphics packages – in particular, ggplot2. The ggplot2 package can create advanced and informative graphics. This training course stresses understanding – not just one off R scripts. By the end of the session, participants will be familiar with themes, scales and facets, as well as the wider ggplot2 world of packages. 8/11 – Statistical Modelling with RFrom the very beginning, R was designed for statistical modelling. Out of the box, R makes standard statistical techniques easy. This course covers the fundamental modelling techniques. We begin the day by revising hypotheses tests, before moving on to ANVOA tables and regression analysis. The class ends by looking at more sophisticated methods such as clustering and principal components analysis (PCA). The post Upcoming R courses with Jumping Rivers appeared first on Jumping Rivers. To leave a comment for the author, please follow the link and comment on their blog: r – Jumping Rivers. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more... This posting includes an audio/video/photo media file: Download Now | ||||||||||||
Posted: 02 Aug 2019 05:00 PM PDT (This article was first published on R Blog on Cillian McHugh, and kindly contributed to R-bloggers) BackgroundThis is an unusual post for me, I have avoided writing about R Markdown because there are so many resources already available on the topic (e.g., here, here, and here). However, recently I ran a session on using RMarkdown for my colleagues in the Centre for Social Issues Research. The aim of this was to demonstrate the usefulness of R Markdown (and hopefully convert a few people). For this session I created a set of resources1 aimed at making the transition from SPSS to R Markdown a bit easier. The statistics content of these resources is mainly just some of the simpler standard tests taught to psychology undergraduate students. The complete resources are available on this project page on the OSF. The main purpose of the exercise was to provide people with the tools to create this pdf using this R Markdown template. My hope is that by using this template, SPSS users might make the tranistion to R, and R Markdown (with the help of the wonderful papaja package Aust (2017)). R Markdown BasicsI started off the workshop by going through some of the basics of R Markdown. When working with R Markdown, there are three types of text to be concerned with.
Each time you open a piece of code (a chunk or in-line code) you have to identify what language you want to code in. This is done by including the letter "r" in the curly brackets or immediately after the opening back tick. Working with RIn order to show some of the basic functionality of R, I ran some analyses using the data sets that are built into R. This means that anyone should be able to reproduce the analyses conducted using the template I provided (without needing to worry about loading data from other files). I also provided another document with an accompanying template detailing the steps for inputting data into R. But this process is more prone to errors and if you are not familiar with R it can be a bit unintuitive. Working with dataframesA dataframe is structured much like an SPSS file. There are rows and columns, the columns are named and generally represent variables. The rows (can also be named) generally represent cases. You can have multiple data frames loaded with different names, although they are commonly saved as Some basics:
The Example code and output:
Statistical testsNow that we know some of the basics, we'll try running some statistical tests. Running a t-testI'm going to use the
In addition to The question I'm going to look at is:
T-test: Transmission and MPG
From the above we can call each value we need using in-line code to write up our results section as follows This is what the paragraph will look like in your Rmd document:An independent samples t-test revealed a significant difference in miles per gallon between cars with automatic transmission The above syntax will return the following:An independent samples t-test revealed a significant difference in miles per gallon between cars with automatic transmission (M = 17.15, SD = 3.83), and cars with manual transmission, (M = 24.39, SD = 3.83), t(18.33) = -3.767, p = .001, d = 1.48. If you want to run another t-test later on in your document you simply run it in a code chunk and create new objects ( Chi-squareTo illustrate a chi-squared test I will test if there is an association between engine type
Report using the followingA chi-squared test for independence revealed no significant association between engine type and transmission type, The above returns the following:A chi-squared test for independence revealed no significant association between engine type and transmission type, χ2(1, N = 32) = 0.348, p = .556 V = 0.1, the observed power was 0.09. (see this resource for effect size calculations for chi-squared tests). ANOVA and CorrelationFor details on the ANOVA check out the pdf using the R Markdown template on the OSF page. TablesAgain using the
For more complex tables and example figures refer to the relevant section of the pdf and R Markdown template on the OSF page. Using CitationsThe It is also generally good practice to cite R and the R packages you have used in your analyses. In the current post I used R (Version 3.6.1; R Core Team 2017) and the R-packages blogdown (Version 0.12; Xie, Hill, and Thomas 2017), bookdown (Version 0.10; Xie 2016), citr (Version 0.3.0; Aust 2016), desnum (Version 0.1.1; McHugh 2017), extrafont (Version 0.17; Chang 2014), ggplot2 (Version 3.2.0; Wickham 2009), knitr (Version 1.23; Xie 2015), lsr (Version 0.5; Navarro 2015), MASS (Version 7.3.51.4; Venables and Ripley 2002), papaja (Version 0.1.0.9842; Aust and Barth 2017), pwr (Version 1.2.2; Champely 2018), and scales (Version 1.0.0; Wickham 2016). ReferencesAust, Frederik. 2016. Citr: 'RStudio' Add-in to Insert Markdown Citations. https://CRAN.R-project.org/package=citr. ———. 2017. "Papaja (Preparing APA Journal Articles) Is an R Package That Provides Document Formats and Helper Functions to Produce Complete APA Manscripts from RMarkdown-Files (PDF and Word Documents)." https://github.com/crsh/papaja. Aust, Frederik, and Marius Barth. 2017. Papaja: Create APA Manuscripts with R Markdown. https://github.com/crsh/papaja. Champely, Stephane. 2018. Pwr: Basic Functions for Power Analysis. https://CRAN.R-project.org/package=pwr. Chang, Winston. 2014. Extrafont: Tools for Using Fonts. https://CRAN.R-project.org/package=extrafont. Haidt, Jonathan. 2001. "The Emotional Dog and Its Rational Tail: A Social Intuitionist Approach to Moral Judgment." Psychological Review 108 (4): 814–34. https://doi.org/10.1037/0033-295X.108.4.814. McHugh, Cillian. 2017. "Desnum: Creates Some Useful Functions." https://github.com/cillianmiltown/R_desnum. Navarro, Daniel. 2015. Learning Statistics with R: A Tutorial for Psychology Students and Other Beginners. (Version 0.5). Adelaide, Australia. http://ua.edu.au/ccs/teaching/lsr. R Core Team. 2017. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/. Venables, W. N., and B. D. Ripley. 2002. Modern Applied Statistics with S. Fourth. New York: Springer. http://www.stats.ox.ac.uk/pub/MASS4. Wickham, Hadley. 2009. Ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. http://ggplot2.org. ———. 2016. Scales: Scale Functions for Visualization. https://CRAN.R-project.org/package=scales. Xie, Yihui. 2015. Dynamic Documents with R and Knitr. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. http://yihui.name/knitr/. ———. 2016. Bookdown: Authoring Books and Technical Documents with R Markdown. Boca Raton, Florida: Chapman; Hall/CRC. https://github.com/rstudio/bookdown. Xie, Yihui, Alison Presmanes Hill, and Amber Thomas. 2017. Blogdown: Creating Websites with R Markdown. Boca Raton, Florida: Chapman; Hall/CRC. https://github.com/rstudio/blogdown.
To leave a comment for the author, please follow the link and comment on their blog: R Blog on Cillian McHugh. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more... This posting includes an audio/video/photo media file: Download Now |
You are subscribed to email updates from R-bloggers. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
This comment has been removed by the author.
ReplyDelete