Much of my computing involves the free statistical computing software "R" (I am a supporting member of the R Project, and have hosted a CRAN mirror).
Over the years, I have occasionally required various standard statistical procedures which unfortunately are not part of R's base package, and have written my own versions. Most of these procedures have doubtless been programmed by others, in other packages, probably much better than I did. However, I have found it helpful to have these files easily available in stand-alone format. They can either be read into R with e.g. "source('statdist.R')", or copied-and-pasted directly into an interactive R shell. Note: they were just written quickly, with no guarantee of correctness -- use at your own risk!
I provide the R procedures here (released under GPL), in case anyone else finds them useful too:
- statdist.R -- a function to compute the stationary distribution of a Markov chain
- invgamma.R -- functions related to the Inverse Gamma distribution
- mvn.R -- functions related to the Multivariate Normal distribution
- matpow.R -- compute powers of a matrix
- plotfunction.R -- an alternative routine for plotting functions of one variable
- monsolve.R -- find a positive root of a (non-vectorised) increasing function
- primefactors.R -- a simple recursive function to return the prime factors of a positive integer
[contact me / Computing Page / Home Page]