Repository navigation
Expand file tree
/
Copy pathdatafitting.html
More file actions
151 lines (118 loc) · 7.8 KB
/
Copy pathdatafitting.html
File metadata and controls
151 lines (118 loc) · 7.8 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<meta NAME="Description" CONTENT="Iterative Proportional Fitting">
<meta NAME="AUTHOR" CONTENT="Iterative Proportional Fitting">
<meta NAME="KEYWORDS" CONTENT="Iterative Proportional Fitting, raking">
<title>Iterative Proportional Fitting</title>
<link rel="shortcut icon" href="https://github.com/edyhsgr/edyhsgr.github.io/raw/master/images/Icon.png">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-9665883-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body TEXT="#505050"
LINK="006699" ALINK="006699" VLINK="006699">
<table WIDTH="100%" NOSAVE >
<table BORDER=0 CELLPADDING=0 align="center" valign="bottom">
<tr NOSAVE>
<td NOSAVE>
<div align=center>
<br>
<table WIDTH="100%" NOSAVE >
<table BORDER=0 CELLPADDING=0 align="center" valign="bottom">
<blockquote>
<td valign=top width=750 >
<font FACE="HELVETICA">
<font size=3">
<br>
<br>
<u><b>Iterative Proportional Fitting Information, Code, and Links</b></u>
</br><span style="display:block; margin-bottom:-15px;"></span></br>
<strong><a STYLE="text-decoration:none"
href="https://edyhsgr.github.io/IPFDescription/AKDOLWDIPFTWOD.pdf" target="_blank">Iterative Proportional Fitting for a Two-Dimensional Table</a>
</strong><br>
An informal description from May 2008 of two-dimensional IPF that I
(<a STYLE="text-decoration:none" href="https://edyhsgr.github.io/">Eddie Hunsinger</a>)
prepared for my coworkers and fellow researchers. Please feel free to offer comments or corrections.
IPF is a big name for a pretty simple (but terrific) technique-- it is used quite a bit, but I think it could be used more. <a STYLE="text-decoration:none"
href="http://www.google.com/search?q=nels+tomlinson" target="_blank">Nels Tomlinson</a> handed down much of any knowledge and computer code that I have on IPF.
<br><br>
<strong><a STYLE="text-decoration:none"
href="https://edyhsgr.github.io/IPFDescription/AKDOLWDIPFTHREED.pdf" target="_blank">Iterative Proportional Fitting for a Three-Dimensional Table</a>
</strong><br>
A description of three-dimensional IPF (May 2008).
<br><br>
<strong><a STYLE="text-decoration:none"
href="https://edyhsgr.github.io/IPFDescription/AKDOLWDIPFFOURD.pdf" target="_blank">Iterative Proportional Fitting for a Four-Dimensional Table</a>
</strong><br>
A description of four-dimensional IPF (May 2008).
<br><br>
<strong><a STYLE="text-decoration:none"
href="https://edyhsgr.github.io/IPFDescription/IPF.zip">Iterative Proportional Fitting R Code</a>
</strong><br>
<a STYLE="text-decoration:none;display:inline;padding:0" href="http://www.r-project.org/" target="_blank">R</a>
code, supporting files and instruction/documentation to perform two-, three- and four-dimensional IPF.
Though I did pieces of the development for the IPF functions, the heavy lifting (the bulk of the 2D and 3D functions) was done by
<a STYLE="text-decoration:none;display:inline;padding:0" href="http://www.google.com/search?q=nels+tomlinson" target="_blank">Nels Tomlinson</a>,
my predecessor at the
<a STYLE="text-decoration:none;display:inline;padding:0" href="http://labor.state.ak.us/" target="_blank">Alaska Department of Labor and Workforce Development</a>.
<br><br>
<strong><a STYLE="text-decoration:none"
href="https://github.com/AppliedDemogToolbox/Sprague_IPFSAS/raw/master/ipf2way.sas" target="_blank">Webb Sprague's Iterative Proportional Fitting SAS Code</a>
</strong><br>
A great
<a STYLE="text-decoration:none" href="http://www.sas.com/" target="_blank">SAS</a>
macro for two-dimensional iterative proportional fitting, developed by Webb Sprague, a researcher with the State of Washington.
Please note this code has only been tested with some sample data (August 2011).
<br><br>
<strong><a STYLE="text-decoration:none"
href="https://github.com/Dirguis/ipfn" target="_blank">Damien Forthommme's ipfn: Iterative Proportional Fitting With N Dimensions For Python</a>
</strong><br>
From the README, "Iterative proportional fitting is an algorithm used is many different fields such as economics or social sciences,
to alter results in such a way that aggregates along one or several dimensions match known marginals (or aggregates along these same dimensions)."
The package includes
<a STYLE="text-decoration:none;display:inline;padding:0" href="https://numpy.org/" target="_blank">NumPy</a>
and
<a STYLE="text-decoration:none;display:inline;padding:0" href="https://pandas.pydata.org/" target="_blank">pandas</a>
versions of the algorithm.
<a STYLE="text-decoration:none;display:inline;padding:0" href="https://github.com/edyhsgr/IPFCompare/blob/main/ipfnCompare.ipynb" target="_blank">Here</a>
is a link to application and comparison of it in a
<a STYLE="text-decoration:none;display:inline;padding:0" href="https://jupyter.org/" target="_blank">Jupyter Notebook</a> (January 2023).
<br><br>
<strong><a STYLE="text-decoration:none"
href="https://edyhsgr.github.io/documents/GQControlExample.pdf" target="_blank">A Particular IPF Application</a>
</strong><br>
An April 2011 message from me with description on use of IPF to reasonably fit
sampled "Group Quarters" (GQ) (shared living facilities, as opposed to traditional households) data to
separately-estimated GQ-type (e.g. prisons, dorms, etc.),
GQ-county (location) and GQ-age (age of resident) control/marginal totals, given sparse and tightly-clustered sample-cell-data by type and county.
<br><br>
<strong><a STYLE="text-decoration:none"
href="http://www.stat.auckland.ac.nz/~lee/SNZ.pdf" target="_blank">Alan Lee's Generating Synthetic Unit-Record Data from Published Marginal Tables</a>
</strong><br>
A May 2007 paper by Alan Lee, a professor from the University of Auckland, that covers IPF and other techniques for cell estimation based on marginal totals, and offers computer code to perform these techniques.
<br><br>
<strong><a STYLE="text-decoration:none"
href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.2073" target="_blank">Paul Norman's Putting Iterative Proportional Fitting on the Researcher's Desk</a>
</strong><br>
An October 1999 paper by Paul Norman, a professor at the University of Leeds, that describes IPF and an MS Excel macro to perform IPF on two-dimensional tables.
<br><br>
<strong><a STYLE="text-decoration:none"
href="https://projecteuclid.org/journals/annals-of-mathematical-statistics/volume-11/issue-4/On-a-Least-Squares-Adjustment-of-a-Sampled-Frequency-Table/10.1214/aoms/1177731829.full" target="_blank">Adjustment of a Sampled Frequency Table When the Expected Marginal Totals are Known</a>
</strong><br>
A useful and historically important text about IPF from December 1940 - pp 439-442 presents an early documentation of the technique.
Some errors related to interpretation in it have been identified since its publication. And
<a STYLE="text-decoration:none;display:inline;padding:0" href="https://www.delpher.nl/nl/tijdschriften/view?coll=dts&identifier=dts:2980078:mpeg21" target="_blank">here</a>
is an earlier (1937) documentation of the technique by a researcher named Kruithoff.
<br><br><br>
<a STYLE="text-decoration:none" href="https://edyhsgr.github.io">Eddie Hunsinger</a>
<br><br>
</div>
<br><br>
</body>
</html>