class: center, middle, inverse, title-slide # Lab 08: Pull yourself up by your bootstraps ### 2018-03-08 --- ## Agenda 1. Reminder: Make sure all team members are contributing 2. Lab 08: Pull yourself up by your bootstraps --- ## Lab 08: Pull yourself up by your bootstraps **Data:** General Social Survey -- **Goals:** - Construct bootstrap confidence intervals for a variety of population parameters - Visualize and interpret these intervals - But before you get there, lots of data wrangling and organizing --- ## Working with large data - GitHub will warn you when pushing files larger than 50 MB, and you will not be allowed to push files larger than 100 MB. - The size of the data file we're working with it 34.3 MB. For perspective, the professor evaluations data in the previous lab was 45KB, which means the GSS data is a little over 750 times the size of the evaluations data. - While our file is smaller than these limits, it's still large enough to not push to GitHub. - `gitignore`: Contains a list of the files you don't want to to commit to Git or push to GitHub. - If you open the `.gitignore` file in your project, you'll see that our data file, `gss2016.csv`, is already listed there. - You won't be pushing the data to GitHub, but since each team member will have the data in their projects, you can still all work with it. - Don't touch the data file though! Git isn't tracking it, so you nobody will be able to tell if you modify it. Just read it in, and work with it in R. --- ## Setting a seed - We'll be doing bootstrapping, i.e. random sampling, so make sure to set a seed. - All members of a given team should use the same seed to get the same results. --- ## Lab flow - Part 1: Estimate a proportion - Part 2: Estimate a median -- you did this in class yesterday - Part 3: Estimate the difference between two means (we mostly walk you through this) - Part 4: Estimate the difference between two proportions Each part requires some data wrangling and visualization along with the inference component --- ## Getting started with lab - Go to the course GitHub organization and find the lab-08 repo that has your team name on it. - On GitHub, click on the green Clone or download button, select Use HTTPS (this might already be selected by default, and if it is, you’ll see the text Clone with HTTPS). Click on the clipboard icon to copy the repo URL. - Go to RStudio Cloud and into the course workspace. Create a New Project from Git Repo. You will need to click on the down arrow next to the New Project button to see this option. - Copy and paste the URL of your assignment repo into the dialog box and hit OK. - Follow the instructions to configure your git credentials. To double check, run the following commands and make sure your info is correct: ``` git config --global user.email git config --global user.name ``` - **New in RStudio Cloud:** The packages you need are already installed!!