Skip to content

Commit 8fab94c

Browse files
committed
Lecture 17
1 parent ce0b951 commit 8fab94c

File tree

8 files changed

+2574
-0
lines changed

8 files changed

+2574
-0
lines changed
Loading
Loading
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*-- scss:defaults --*/
2+
3+
$body-bg: #b7b09c;
4+
$body-color: #4e3629;
5+
$link-color: #ff5050;
6+
$presentation-heading-color: #cc0000;
7+
$code-color: #cc0000;
8+
$code-block-bg: #ded9ca;
9+
$code-block-border-color: #000000;
10+
11+
/*-- scss:rules --*/
12+
13+
.reveal .slide-number {
14+
color: $link-color;
15+
}
16+
17+
.reveal .footer {
18+
font-size: 0.35em !important;
19+
text-align: left !important;
20+
}
21+
22+
.reveal .slides section .fragment.semi-fade-out {
23+
opacity: 1;
24+
visibility: inherit;
25+
26+
&.visible {
27+
opacity: 0.25;
28+
visibility: inherit;
29+
}
30+
}
31+
32+
.sectionhead {
33+
font-size: 1em;
34+
text-align: center;
35+
color: $presentation-heading-color;
36+
font-family: $presentation-heading-font;
37+
background-color: $body-bg;
38+
margin: 1px;
39+
padding: 2px 2px 2px 2px;
40+
width: 120px;
41+
border-left: 10px solid;
42+
}
43+
44+
.blackbox {
45+
color: #000000;
46+
background-color: transparent;
47+
margin: 1px;
48+
padding: 5px 2px 5px 2px;
49+
height: 205px;
50+
border: 2px solid;
51+
}

Lecture_Materials_2023/Lecture_17_Regression_Part2/lecture17_regression_part2.html

Lines changed: 2418 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: |
3+
| Regression Part 2
4+
| POLS 3316: Statistics for Political Scientists
5+
date: today
6+
author: "Tom Hanna"
7+
format:
8+
revealjs:
9+
self-contained: true
10+
code-fold: true
11+
code-summary: "Show the code"
12+
transition: convex
13+
theme: [moon, custom.css]
14+
logo: logo.png
15+
footer: "POLS3316, Fall 2023, Instructor: Tom Hanna"
16+
---
17+
18+
19+
## Regression (Part 2)
20+
21+
- Review
22+
23+
- More on some terms that have been used occasionally: fit, fitted, predicted, residual, predictors, estimates (plus estimator and estimand)
24+
25+
- Regression with two or more Xs: multiple linear regression
26+
27+
- Interpreting Regression Results
28+
29+
## Review
30+
31+
<p style="color:red;text-align:center;font-size: 40px;">
32+
33+
$y = \alpha + \beta X + \epsilon$
34+
35+
</p>
36+
37+
## Assumptions (Testable)
38+
39+
- Linearity
40+
- Normality
41+
- Independence
42+
- Homoskedasticity
43+
- No *perfect* multicollinearity
44+
45+
46+
## The process of *least squared* residuals
47+
48+
- Similar to the process of finding variance by measuring squared distances to the mean
49+
- This measures squared distances to the line given by the equation
50+
- The method aims to minimize the sum of the squared distances - the sum of squared residuals
51+
52+
## New terms (or new definitions)
53+
54+
- fit, fitted, predicted - the model's prediction for the expected value of y for a given value of x
55+
- predictors - x variables
56+
- estimates (plus estimator and estimand) - the values of the parameters (alpha and beta) estimated by the model
57+
- residual - the vertical distance between the observed and the estimated (fitted, predicted) using estimated parameters.
58+
59+
60+
## Multiple Linear Regression
61+
62+
- During the lecture on causation, I said that causes aren't simple - there are often multiple causes
63+
64+
- So how do we analyze 2 (or 3 or 20) explanatory (X) variables?
65+
66+
## Multiple Linear Regression: Answer
67+
68+
With OLS regression.
69+
70+
When we add a second X, we add a new axis so now we don't have a line, we have the 3d equivalent::
71+
72+
## Multiple Linear Regression: Answer
73+
74+
![Multiple Regression plane](mrplane.png)
75+
76+
## Multiple Linear Regression: Answer
77+
78+
We can't really visualize more than two Xes geometrically, but the idea is the same.
79+
80+
81+
## Interpreting and writing regression results
82+
83+
- Examples focusing on sample project and your project data
84+
85+
86+
87+
88+
89+
90+
91+
92+
## Authorship, License, Credits
93+
94+
- Author: Tom Hanna
95+
96+
- Website: <a href="https://tom-hanna.org/">tomhanna.me</a>
97+
98+
- License: This work is licensed under a <a href= "http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.</a>
99+
100+
<a href= "http://creativecommons.org/licenses/by-nc-sa/4.0/">![Creative Commons License](creative_commons_license.png)</a>
101+
102+
103+
104+
105+
Loading
Loading
Loading

0 commit comments

Comments
 (0)