Monthly Archives: October 2013

Detecting an Unfair Die with Bayes’ Theorem

Detecting an Unfair Die with Bayes’ Theorem

Introduction I saw an interesting problem that requires Bayes’ Theorem and some simple R programming while reading a bioinformatics textbook.  I will discuss the math behind solving this problem in detail, and I will illustrate some very useful plotting functions to generate a plot from R that visualizes the solution effectively. The Problem The following question is

Read more »

More significant? so what…

October 30, 2013
By
More significant? so what…

Following my non-life insurance class, this morning, I had an interesting question from a student, that I will try to illustrate, and reformulate as accurately as possible. Consider a simple regression model, with one variable of interest, and one possible explanatory variable. Assume that we have two possible models, with the following output (yes, I do hide interesting parts...

Read more »

Multiple Removal Estimates at Once

October 30, 2013
By
Multiple Removal Estimates at Once

A Question Recently, a fishR user asked me the following question: I have recently used the FSA package to calculate Zippin depletion population estimates resulting from 3 pass removals on smaller trout streams. I have currently been doing this the … Continue reading →

Read more »

What Hadley Wickham uses

October 30, 2013
By

You know Hadley Wickham as the inventor of the ggplot2 visualization phenomenon, the creator of time-saving R packages like plyr and lubridate, and the Chief Scientist at RStudio. But do you know what laptop Hadley uses, what software he uses (besides, R, of course), or his favourite kitchen appliance? Find out Hadley's interview with The Setup. (Also check out...

Read more »

R and my divorce from Word

October 30, 2013
By
R and my divorce from Word

Being in grad school, I do a lot of scholarly writing that requires associated or embedded R analyses, figures, and tables, plus bibliographies. Microsoft Word makes this unnecessarily difficult. Many tools are now available to break free from the tyranny of Word. The ones I like involve writing an article in markdown format, integrating all data preparation,...

Read more »

Binomial confidence intervals: exact vs. approximate

October 30, 2013
By
Binomial confidence intervals: exact vs. approximate

This graph and R code compares the exact vs. normal approximations for 95% binomial confidence intervals for n trials with either one success or 50% success. Continue reading →

Read more »

Financial Data Accessible from R – part II

October 30, 2013
By

I updated my initial post with two new sources of data and the associated R packages: Datastream and PWT. I also added the fImport package from Rmetrics. Following a reader suggestion, I made the initial table  more interactive, moved  the data description and package detail below the main table and updated them. Enjoy! Source R

Read more »

Percolation Threshold on a Square Lattice

October 29, 2013
By
Percolation Threshold on a Square Lattice

Manfred Schroeder touches on the topic of percolation a number of times in his encyclopaedic book on fractals (Schroeder, M. (1991). Fractals, Chaos, Power Laws: Minutes from an Infinite Paradise. W H Freeman & Company.). Percolation has numerous practical applications, the most interesting of which (from my perspective) is the flow of hot water through

Read more »

Bacteria and Alzheimer’s disease: I just need to know if ten patients are enough

October 29, 2013
By
Bacteria and Alzheimer’s disease: I just need to know if ten patients are enough

You can guarantee that when scientists publish a study titled: Determining the Presence of Periodontopathic Virulence Factors in Short-Term Postmortem Alzheimer’s Disease Brain Tissue a newspaper will publish a story titled: Poor dental health and gum disease may cause Alzheimer’s Without access to the paper, it’s difficult to assess the evidence. I suggest you read

Read more »

swirl: Learning Statistics & R

October 29, 2013
By
swirl

Most of us would acknowledge that getting up to speed with R involves a pretty steep learning curve - but it's worth every drop of sweat we shed in the process! If you're learning basic statistics/econometrics, and learning R at the same time, then the challenge is two-fold. So, anything that will make this feasible (easy?) for students and instructors alike...

Read more »