class: center, middle, inverse, title-slide # Lab 08: Multinomial Logistic Regression ### 03.29.19 --- ## Agenda 1. Lab introduction 2. Working with large data 3. Getting started --- ### Lab 08: Multinomial Logistic Regression - <font class="vocab">Goal</font>: Create a multinomial logistic regression model to understand the relationship between a person's political views and their attitude towards government spending on mass transportation - <font class="vocab">Data</font>: General Social Survey, a survey conducted since 1972 that tracks trends in attitudes towards various societal issues along with behavioral trends. You will use results from the 2016 survey. - Use the [lecture notes](https://www2.stat.duke.edu/courses/Spring19/sta210.001/slides/lec-slides/18-multinomial-logistic-pt2.html#1) for help with concepts and code. --- ## 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. Compare that to the Spotify dataset from last weeks' lab which was 149 KB (0.149 MB)! - 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. --- ## Getting started with the lab - Go to the course GitHub organization and find the **lab-06** 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 click OK. - Run the following in the console to configure Git: ```r library(usethis) use_git_config(user.name="your name", user.email="your email") ``` - **Use the email address associated with your GitHub account** --- ## Caching your password You need to cache your password on a per-project basis: - Go to the **Terminal** within a project (the most recent lab?) - Type the following to cache your password for `\(60 * 60 * 24 * 7 = 604800\)` seconds ```bash git config --global credential.helper 'cache --timeout 604800' ``` You will need to enter your GitHub username and password one more time after caching the password. After that you won't need to enter your credentials for 604800 seconds = 7 days.