-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.html
384 lines (284 loc) · 15.3 KB
/
index.html
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>free range statistics</title>
<meta name ="description" content ="I write about applications of data and analytical techniques like statistical modelling and simulation to real-world situations. I show how to access and use data, and provide examples of analytical products and the code that produced them.">
<meta property="og:description" content ='I write about applications of data and analytical techniques like statistical modelling and simulation to real-world situations. I show how to access and use data, and provide examples of analytical products and the code that produced them.'>
<meta property="og:site_name" content="free range statistics" />
<meta property="og:title" content="free range statistics" />
<meta property="og:image" content="/img/general-image.png" />
<meta property="og:url" content="https://freerangestats.info/index.html" />
<meta property="og:author" content= "https://www.facebook.com/peterstats" />
<meta property="og:type" content="article" />
<link href='https://fonts.googleapis.com/css?family=Sarala' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Prosto+One' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Ubuntu+Mono' rel='stylesheet'>
<link href="/css/bootstrap.min.css" rel ="stylesheet" type="text/css">
<link href="/css/bootstrap-theme.min.css" rel ="stylesheet" type="text/css">
<link href="/css/custom.css" rel ="stylesheet" type="text/css">
<link href="/css/syntax.css" rel ="stylesheet" type="text/css">
<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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-65886313-1', 'auto');
ga('send', 'pageview');
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<style>
ul li { margin-bottom: 9px; }
ol li { margin-bottom: 9px; }
</style>
<link rel="alternate" type="application/rss+xml" title="free range statistics by Peter Ellis"
href="/feed.xml">
</head>
<body role = "document">
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script>
(function() {
var cx = '015640467633673901770:pk3v2c95baw';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">free range statistics</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="/about">about</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">all posts <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/blog">ordered by date</a></li>
<li><a href="/blog/most-popular.html">ordered by popularity</a></li>
<li><a href="/blog/index_by_tag.html">grouped by subject matter</a></li>
<li><a href="/blog/nz.html">all posts with data about new zealand</a></li>
<li><a href="/blog/voting.html">all posts on voting behaviour</a></li>
<li><a href="/blog/surveys.html">all posts on surveys</a></li>
<li><a href = /blog/2024/11/30/ponzi-schemes>most recent post</a></li>
</ul>
</li>
<li><a href="/blog/showcase.html">showcase</a></li>
<li><a href="/presentations/index.html">presentations</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">forecasts<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href = "/covid-tracking/index.html">Covid-19 in Australia</a></li>
<li><a href = "/elections/nz-2020/index.html">NZ election 2020</a></li>
<li><a href = "/elections/oz-2019/index.html">Australia federal election 2019</a></li>
<li><a href = "/elections/nz-2017/combined.html">NZ election 2017</a></li>
<li><a href="/blog/voting.html">all blog posts on voting behaviour</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div class="jumbotron">
<div class="container">
<h1>free range statistics</h1>
</div>
</div>
<div class = "container">
<div class ="row">
<div class="post-summary">
<p>I write about applications of data and analytical techniques like statistical modelling and simulation to real-world situations. I show how to access and use data, and provide examples of analytical products and the code that produced them.</p>
</div>
</div>
</div>
<div><gcse:search></gcse:search></div>
<div class ="container">
<h2>Recent posts</h2>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/11/30/ponzi-schemes">
<h3>Simulating Ponzi schemes</h3>
<h4>30 November 2024</h4>
</a>
<p>I write a function to simulate Ponzi schemes with various types of 'investor' growth, withdrawal rates, and extraction by the scammer / owner of the scheme.</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/11/30/ponzi-schemes"><img src = /img/0283-ponzi2.svg height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/11/16/design-effects">
<h3>Design effects for stratified sub-populations</h3>
<h4>16 November 2024</h4>
</a>
<p>I look at the two different sorts of design effects that Stata will report for estimates from sub-populations of a complex survey, which vary depending on whether or not the hypothetical simple random sample we are comparing the complex survey to has the same sub-population sample sizes as the actual sample.</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/11/16/design-effects"><img src = /img/0263-scatter.svg height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/11/06/simplex-regression-coefficients">
<h3>Regressions where the coefficients are a simplex.</h3>
<h4>06 November 2024</h4>
</a>
<p>I compare some different ways of forcing the coefficients in a regression to form a simplex, all greater than zero and adding up to exactly one. Two methods - quadratic programming, and explicit modelling of the coefficients from a Dirichlet distribution - give essentially identical results that match the data generating process well.</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/11/06/simplex-regression-coefficients"><img src = /img/0281b-pairs.svg height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/09/28/ihaka-lecture">
<h3>Git, peer review, tests and toil</h3>
<h4>28 September 2024</h4>
</a>
<p>I was honoured to give the third and final Ihaka Lecture in the 2024 series. My talk had the theme "Making R work in government".</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/09/28/ihaka-lecture"><img src = /img/git-project-diagram-spc-themed.png height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/09/21/primes-squares">
<h3>Prime numbers as sums of three squares.</h3>
<h4>21 September 2024</h4>
</a>
<p>I explore the number of ways to make a prime number as the sum of squares of three positive integers.</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/09/21/primes-squares"><img src = /img/0280-primes-squares-k100.svg height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/09/14/stepwise">
<h3>Stepwise selection of variables in regression is Evil.</h3>
<h4>14 September 2024</h4>
</a>
<p>Stepwise variable selection is bad and dangerous, and you shouldn't do it. It increases false positives. It drops variables that should be in the model. It gives biased estimates for regression coefficients. The problems are worse for smaller samples; higher correlation between the X variables; and models with weaker explanatory power for the y (i.e. lower R-squared).</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/09/14/stepwise"><img src = /img/0279-corr-sd-bias.svg height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/09/08/sex-gender">
<h3>Gender and sexuality in Australian surveys and census</h3>
<h4>08 September 2024</h4>
</a>
<p>I familiarise myself with the Australian Bureau of Statistics' statistical Standard on sex and gender, and play around with some data from the Australian General Social Survey that has outputs reported by persons' sexual orientation.</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/09/08/sex-gender"><img src = /img/0278-lollipops.svg height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/08/31/ppswor">
<h3>Sampling without replacement with unequal probabilities</h3>
<h4>31 August 2024</h4>
</a>
<p>I play around with sampling from finite populations with unequal probabilities, where the R sample() function turns out not to work the way I had expected it to.</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/08/31/ppswor"><img src = /img/0276-20-10-no-replace.svg height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/08/30/australian-economy">
<h3>Ratios of indexed line charts</h3>
<h4>30 August 2024</h4>
</a>
<p>I draw some quick charts of Australian economic indicators and ponder the implications. A ratio of two indexes can be a useful part of exploratory analysis.</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/08/30/australian-economy"><img src = /img/0275-inc-exp-gdp-2014.svg height = "150"></a>
</div>
</div>
<hr> </hr>
<div class ="row">
<div class="col-md-8">
<a href="/blog/2024/08/24/polar-maps">
<h3>Polar-centred maps</h3>
<h4>24 August 2024</h4>
</a>
<p>I draw maps of the largest settlements closest to the north pole and to the south pole, based on an idea by 'Brilliant Maps'.</p>
</div>
<div class = "col-md-4">
<a href="/blog/2024/08/24/polar-maps"><img src = /img/0274-most-south.png height = "150"></a>
</div>
</div>
</div>
<div class = "container">
<hr> </hr>
</div>
</div>
<div class = "container footer">
<footer>
<gcse:search></gcse:search>
<p>Follow <a href = "/feed.xml">this blog with RSS</a>.</p>
<p>Find me on <a rel="me" href="https://mastodon.social/@peter_ellis">Mastodon</a>.</p>
<p>My day job is Director of the <a href='https://sdd.spc.int/'>Statistics for Development Division</a> at the Pacific Community, the principal scientific and technical organisation in the Pacific region, proudly supporting development since 1947. We are an international development organisation owned and governed by our 27 country and territory members. This blog is not part of my role there and contains my personal views only.</p>
<p>I'm pleased to be aggregated at <a href="https://www.r-bloggers.com/">R-bloggers</a>, the one-stop shop for blog posts featuring R.</p>
<div class="fb-like" data-href="https://www.facebook.com/peterstats/" data-layout="standard" data-action="like" data-show-faces="true" data-share="false"></div>
<p>
<span xmlns:dct="https://purl.org/dc/terms/" property="dct:title">free range statistics</span> by <a href = "/about/index.html">Peter Ellis</a> is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
</p>
</footer>
</div>
<!-- Default Statcounter code for Free Range Statistics https:/freerangestats.info -->
<script type="text/javascript">
var sc_project=11673245;
var sc_invisible=1;
var sc_security="5b7111a4";
</script>
<script type="text/javascript"
src="https://www.statcounter.com/counter/counter.js" async></script>
<noscript><div class="statcounter"><a title="Web Analytics"
href="https://statcounter.com/" target="_blank"><img class="statcounter"
src="//c.statcounter.com/11673245/0/5b7111a4/1/" alt="Web
Analytics"></a></div></noscript>
<!-- End of Statcounter Code -->
</body>
</html>