02:00
Lecture 25
Cornell University
INFO 2950 - Spring 2024
April 25, 2024
What is political ideology? How do you measure it for a legislator?
02:00
Defining ideology on a liberal-conservative spectrum
Data set \(X_1, X_2, \ldots, X_p\)
\[Z_1 = \phi_{11}X_1 + \phi_{21}X_2 + \dots + \phi_{p1}X_p\]
\(\max \mathrm{Var}(Z_1)\)
\(\phi_1\) - first principal component loading vector
Normalized \(\phi\)
\[\sum_{j=1}^p \phi_{j1}^2 = 1\]
\[Z_2 = \phi_{12}X_1 + \phi_{22}X_2 + \dots + \phi_{p2}X_p\]
\[\max \mathrm{Var}(Z_2)\]
# A tibble: 60,000 × 785
label pixel1 pixel2 pixel3 pixel4 pixel5 pixel6 pixel7 pixel8 pixel9 pixel10
<fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Pullo… 0 0 0 0 0 0 0 0 0 0
2 Ankle… 0 0 0 0 0 0 0 0 0 0
3 Shirt 0 0 0 0 0 0 0 5 0 0
4 T-shi… 0 0 0 1 2 0 0 0 0 0
5 Dress 0 0 0 0 0 0 0 0 0 0
6 Coat 0 0 0 5 4 5 5 3 5 6
7 Coat 0 0 0 0 0 0 0 0 0 0
8 Sandal 0 0 0 0 0 0 0 0 0 0
9 Coat 0 0 0 0 0 0 3 2 0 0
10 Bag 0 0 0 0 0 0 0 0 0 0
# ℹ 59,990 more rows
# ℹ 774 more variables: pixel11 <dbl>, pixel12 <dbl>, pixel13 <dbl>,
# pixel14 <dbl>, pixel15 <dbl>, pixel16 <dbl>, pixel17 <dbl>, pixel18 <dbl>,
# pixel19 <dbl>, pixel20 <dbl>, pixel21 <dbl>, pixel22 <dbl>, pixel23 <dbl>,
# pixel24 <dbl>, pixel25 <dbl>, pixel26 <dbl>, pixel27 <dbl>, pixel28 <dbl>,
# pixel29 <dbl>, pixel30 <dbl>, pixel31 <dbl>, pixel32 <dbl>, pixel33 <dbl>,
# pixel34 <dbl>, pixel35 <dbl>, pixel36 <dbl>, pixel37 <dbl>, …
\[\sum_{j=1}^p \mathrm{Var}(X_j) = \sum_{j=1}^p \frac{1}{N} \sum_{i=1}^N x_{ij}^2\]
\[\frac{1}{N} \sum_{i=1}^N z_{im}^2 = \frac{1}{N} \sum_{i=1}^N \left( \sum_{j=1}^p \phi_{jm} x_{ij} \right)^2\]
\[\text{PVE} = \frac{\sum_{i=1}^N \left( \sum_{j=1}^p \phi_{jm} x_{ij} \right)^2}{\sum_{j=1}^p \sum_{i=1}^N x_{ij}^2}\]
\[\text{PVE} = \frac{\lambda_m}{\sum_{j=1}^p \lambda_j}\]
ae-23
ae-23
(repo name will be suffixed with your GitHub name).