Burnished Mossite
https://blog.jonasmoss.com/
Recent content on Burnished MossiteHugo -- gohugo.ioen-usFri, 20 Dec 2019 00:00:00 +0000Implied alternatives
https://blog.jonasmoss.com/2019/12/implied-alternatives/
Fri, 20 Dec 2019 00:00:00 +0000https://blog.jonasmoss.com/2019/12/implied-alternatives/Sometimes people talk about p-values without alternative hypotheses. I will now explain why this is wrong-headed. It is wrong-headed since there is always a set of implied alternatives.
Take any p-value \(U\). By definition, \(U\) is uniform under the null hypothesis \(H_0\) that the true probability measure is \(P\). All is fine and good. Now assume that \(Q\) is the true probability measure and that the distribution function \(Q(U \leq u)\) looks like this:A proof of rejection sampling correctness
https://blog.jonasmoss.com/2019/12/a-proof-rejection-sampling/
Sat, 14 Dec 2019 00:00:00 +0000https://blog.jonasmoss.com/2019/12/a-proof-rejection-sampling/Let \(f\left(x\right)\) be a density and \(\pi\left(x\right)\) be a function satisfying \(0\leq\pi\left(x\right)\leq1\). In other words, \(\pi\left(x\right)\) is a probability for every \(x\). Then \(g\left(x\right)\propto f\left(x\right)\pi\left(x\right)\) is density, since \(\rho=\int f\left(x\right)\pi\left(x\right)dx<1\). This is an example of a , a class of models introduced by Rao (1965). Since \(p\left(x\right)\) is a probability, we can call this a . This note views rejection sampling (Neumann 1951) as sampling from a particular sort of probability weighted density.Variorum of Statistical Methods for Research Workers
https://blog.jonasmoss.com/2018/09/smrw-variorum/
Wed, 12 Sep 2018 00:00:00 +0000https://blog.jonasmoss.com/2018/09/smrw-variorum/Statistical Methods for Research Workers (1924, henceforth SMRW) was Fisher’s first book. Its’ a textbook for practicing scientist, and probably the most important book on practical statistics book published. It went through 14 editions from 1924 to 1970.
The book is obviously of pure historical interest, and it should be illuminating in itself to read the perstives of Fisher. An interesting application of SMRW is to track changes in Fisher’s thought by looking at the changes in editions of SMRW.Easy lambdas
https://blog.jonasmoss.com/2018/08/easy-lambda/
Thu, 23 Aug 2018 00:00:00 +0000https://blog.jonasmoss.com/2018/08/easy-lambda/R already has anonymous functions. Just write function(x) do_someting and you’re done. This post is for all of us who are not satisified with this solution. For one, it’s exhausting to write to long function(x) instead of, say, L(x), but that’s not all of it!
Take the following example, a calculation of the maximum likelihood estimate of a gamma distribution:
set.seed(313) x = rgamma(100, 2, 4) nlm(f = function(p) -mean(dgamma(x, shape = p[1], rate = p[2], log = TRUE)), p = c(1, 1))$estimate ## [1] 2.Handling side effects with the .H function
https://blog.jonasmoss.com/2018/08/h-function/
Tue, 21 Aug 2018 00:00:00 +0000https://blog.jonasmoss.com/2018/08/h-function/The Problem of Side Effects When I am writing \(\mathtt{R}\) code, I often do stuff in the body of my script that creates undesired side effects.
# n and x constants I wish to use later n = 100 x = pi^2/6 # lots of code # ... # I suddenly wish to plot something n = 1:1000 x = 0.1 plot(n, pnorm(sqrt(n)*x), type = "l") Notice that n and x have been rewritten.Commentary on Synthese (1977) Part I: Neyman's Paper
https://blog.jonasmoss.com/2018/08/synthese-neyman-1977/
Sun, 19 Aug 2018 00:00:00 +0000https://blog.jonasmoss.com/2018/08/synthese-neyman-1977/Synthese is a generalist philosophy journal. It’s usually ranked among the 20 best, usually at the lower end. At least some of its focus is on themes I care about, including decision theory, interpretations of probability, probability paradoxes such as the Sleeping Beauty problem, and, of course, the philosophy of statistics.
And the first issue of the 36th volume of Synthese was devoted to the philosophy of statistics. The occasion was Allan Birnbaum’s passing the year before, and the issue is built around his last submission to the journal.A commentary on 'Tests of Significance Considered as Evidence' (1942) by Joseph Berkson
https://blog.jonasmoss.com/2018/08/berkson-commentary/
Fri, 10 Aug 2018 00:00:00 +0000https://blog.jonasmoss.com/2018/08/berkson-commentary/This paper is old, and it shows! He starts of with the following:
There was a time when we did not talk about tests of significance; we simply did them. We tested whether certain quantities we significant in the light of their standard errors, without inquiring as to just what was involved in the procedure, or attempting to generalize it.
Sounds like the golden age of statistics! But the twilight of that age had long passed, for when he wrote this paper, statistics “consists almost entirely of tests of significance”.About
https://blog.jonasmoss.com/about/
Fri, 10 Aug 2018 00:00:00 +0000https://blog.jonasmoss.com/about/I’m Jonas Moss, a statistics PhD student at the University of Oslo. I have three kids, two cats, and one wife. I’m interested in R programming, the replication crisis in psychology, theoretical statistics, effective altruism, and rationalism à la Lesswrong and Slate Star Codex.
This blog is made in RStudio with blogdown, using Hugo and the Tranquilpeak theme. The .Rmd source files for all posts are available on GitHub.
The mineral to the right is a tapiolite, which is related to the mineral mossite this blog is named after.Optional stopping, streaks, and champagne
https://blog.jonasmoss.com/2018/04/optional-stopping-streaks/
Sat, 28 Apr 2018 00:00:00 +0000https://blog.jonasmoss.com/2018/04/optional-stopping-streaks/At the Psychological Methods Discussion group, Ben Ambridge asked the following question:
Hi everyone - I was wondering (don’t worry, I haven’t actually done this!) what would be wrong statistically speaking with an approach where you run a frequentist t-test (or whatever) after adding each participant and stop testing participants when the p value has remained below 0.05 (or 0.001 or whatever) for - say - each of the last 20 participants.
https://blog.jonasmoss.com/about/
Mon, 01 Jan 0001 00:00:00 +0000https://blog.jonasmoss.com/about/