This page was last updated on October 04, 2019.
It is continually being updated, so be sure to refresh the page in your browser each time you visit!
You should download copies of these helpful cheatsheets and have them on hand:
These cheat sheets deal with packages that will increasingly be used in the tutorials:
These tutorials teach you the fundamentals of R and R Markdown, and should be completed prior to attempting any subsequent tutorials.
Reproducible R with R Markdown Updated: Friday Sept 7, 3pm: I clarified instructions on creating new projects in RStudio
Importing data into R Work in progress
This tutorial provides instructions on how to prepare your assignments for submission.
Before conducting any analyses, it is crucial to visualize your data with effective graphs. This can help identify potential problems with the data, including data entry errors or otherwise unusual observations to be flagged. Good quality graphs can help you describe your data effectively to your audience, and are thus crucial to effective science communication.
Frequency distributions - what are they?
List of functions
To draw reliable inferences about properties of a population of interest (e.g. What is the average height of trees in the city of Kelowna?), one requires an unbiased, representative sample to work with.
In this tutorial you will learn how to:
In this tutorial we use simulations to illustrate the concept of a “random trial”.
In this tutorial we learn how simulated data can be used to test hypotheses.
This tutorial also illustrates how to approach hypothesis testing, and how to prepare your answer to questions that involve hypothesis tests.
Properties of the sampling distribution for a proportion
Calculating the Standard Error for a Proportion
Calculating a Confidence interval for a Proportion
NOTE: The binomial test is a type of “Goodness of Fit” test, which we learn more about in the next tutorial. In this case, we’re examining a single categorical variable that has 2 categories only, and we’re interested in whether the frequencies of observervations in the 2 categories fit our expectations based on the binomial distribution.
Binomial distribution functions in R
Confidence interval approach to hypothesis testing
NOTE: Here we’re examining a single categorical variable that has more than 2 categories, and we’re interested in whether the frequencies of observervations among the categories fit our expectations based on some model, such as the proportional model.
Refresher
List of functions
NOTE: Here we’re examining associations between two categorical variables that each have 2 categories. The Odds Ratio method are typically only used when analyzing health related data.
Estimate the odds of an outcome
Estimate the odds ratio
List of functions
NOTE: Here we’re examining associations between two categorical variables.
The Gaussian (normal) distribution
Generating a normal distribution
The central limit theorem - a simulation
List of functions
NOTE: Here we’re examining a single numeric variable, and comparing its mean to some expectation.
NOTE: you must also consult the Checking assumptions and data transformations tutorial.
NOTE: A tutorial covering “non-parametric” tests, which are used when assumptions of parametric tests (like the t-test), is in preparation, but will not be complete until late 2019. In the meantime, you can explore some non-parametric tests here.
Confidence intervals for an estimate of \(\mu\)
Activity: Practice confidence interval
List of functions
NOTE: Here we’re examining a single numeric variable in relation to a single categorical variable that has only 2 groups.
NOTE: you must also consult the Checking assumptions and data transformations tutorial.
NOTE: A tutorial covering “non-parametric” tests, which are used when assumptions of parametric tests (like the t-test), is in preparation, but will not be complete until late 2019. In the meantime, you can explore some non-parametric tests here.
When assumptions aren’t met
List of functions
NOTE: Here we’re examining a single numeric variable in relation to a single categorical variable that has more than 2 categories (groups).
If you wish, you can download the R Markdown file that generated the tutorial here. For it to work, you also need to download a “css” file linked here (called “tutorial.css”), and place it in a directory one down from your working directory.
Model I versus Model II regression
List of functions
RMD file
You can download all the RMD files for tutorials 0 through 17 and for the Extra tutorials here. It is a “zip” file that contains:
NOTE: the zipped file containing RMD files has not been updated since spring 2019. I will re-zip newer RMD files in October 2019.
To successfully knit these RMD files yourself, you must maintain the directory structure that is provided when you unzip the ZIP file. That is, the “more” subdirectory must be in the same directory as the RMD files, and the “tutorial.css” file must be located in the same directory as the RMD files.
Checking assumptions and data transformations
Importing data into R Work in progress