This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Multiple linear regression | |
## Regression table | |
Instructions: | |
- Indicate which model you selected: parallel slopes or interaction. | |
- Fit your selected regression model and display the regression table in the code | |
block below | |
- Modify the template formula below from ModernDive 6.1.2 to match your model (this formula is written in the LaTeX typesetting language for printing mathematical formulas) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on data from "House Prices: Advanced Regression Techniques" Kaggle Competition | |
# https://www.kaggle.com/c/house-prices-advanced-regression-techniques | |
# YouTube demo can be found here: | |
library(tidyverse) | |
library(rpart) | |
library(Metrics) | |
# Reload house prices data | |
train <- read_csv("https://rudeboybert.github.io/SDS293/static/train.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Show all databases in on scidb.smith.edu server. */ | |
SHOW DATABASES; | |
/* Load the imdb database. */ | |
USE imdb; | |
/* Show the names of all tables in imdb. */ | |
SHOW TABLES; | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
# Create two example data frames: | |
dfA <- tibble( | |
ID = c(76, 79, 9), | |
age = c(21, 23, 24) | |
) | |
dfB <- tibble( | |
ID = c(79, 76, 11), | |
state = c("MA", "OR", "DE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(dplyr) | |
library(lubridate) | |
library(ical) | |
# For a screencast demo on creating a calendar and exporting it to .ics file format | |
# see this video: https://youtu.be/vLlR4lBWAoc | |
# Locate your .ics calendar file on your computer and change what's in quotation marks | |
calendar_data <- "192.ics" %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
# Install version 0.2.0.9000 or higher | |
# devtools::install_github("moderndive/moderndive") | |
library(moderndive) | |
# Chapter 8: "Virtual" sampling from a bowl of red/white balls | |
# Population: | |
bowl | |
# Sample from population: | |
bowl %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------ | |
# Lec21: 2019/04/22 | |
#------------------------------------------------------------------------------ | |
library(tidyverse) | |
library(glmnet) | |
library(broom) | |
library(modelr) | |
library(ISLR) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------ | |
# Lec14: 2019/03/25 | |
#------------------------------------------------------------------------------ | |
library(tidyverse) | |
# Pre-process iris dataset | |
iris <- iris %>% | |
# Convert to tibble data frame: | |
as_tibble() %>% | |
# Add identification variable to uniquely identify each row: | |
rownames_to_column(var="ID") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(moderndive) | |
# Convert to tibble: | |
mtcars <- mtcars %>% | |
rownames_to_column() | |
# Fit lm | |
mpg_model <- lm(mpg ~ hp, data = mtcars) |
NewerOlder