-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
54 lines (43 loc) · 2.11 KB
/
Copy pathREADME.Rmd
File metadata and controls
54 lines (43 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
output: github_document
bibliography: references.bib
nocite: '@*'
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# IRLS repository
<!-- badges: start -->




<!-- badges: end -->
This repository provides a from‑first‑principles implementation of the
**Iteratively Reweighted Least Squares (IRLS)** algorithm for logistic regression.
It is designed for graduate students, advanced undergraduates, and practitioners
with a strong interest in computational statistics, numerical optimization, and
the theoretical foundations of generalized linear models. In addition to a
detailed mathematical derivation, the repository includes annotated R code and
a real‑world case study using stock market data, offering both theoretical
insight and practical application.
By visiting the website (`vadimtyuryaev.github.io/IRLS/`) and following the
accompanying calculations and code implementations, you will:
1. **Understand the exponential‑family formulation** of the binomial distribution,
and derive the log‑likelihood, score vector, and Fisher information from
first principles.
2. **See how Newton–Raphson** algorithm applied to the binomial log‑likelihood
can be recast as weighted least squares, laying the theoretical foundation
for the IRLS.
3. **Walk through the IRLS algorithm** with an easy-to-follow mathematical
derivation and clear matrix formulation.
4. **Examine an R implementation** (`IRLS_logistic_binomial`) with detailed
annotations, illustrating how to initialize, iterate, and stabilize your fits in
practice.
5. **Apply IRLS to real data** (the `S&P Daily Smarket dataset`), and directly
verify that results obtained reproduce the same coefficients as R's built-in
function `glm(..., family=binomial)`.
# References