P.Mean: Archive organized by date (created 2013-01-14).

This page lists files created in calendar year 2013. Also look at the archives for 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, and 1999. You can also browse through an archive of pages organized by topic.

November 2013

14. P.Mean: Testing an R function (created 2013-11-02). I am working on a grant resbumission and one of the things I need to do is write up is more details about the process we will use to develop the programs that we need to monitor patient accrual. I write a lot of programs, but almost all of them are programs that are run once, in a very specialized and tightly controlled setting. If you develop programs that other people will use, you need to test them against a range of inputs to make sure that they do what you want them to do. This is one of the topics covered in a short course I took at the Joint Statistical Meetings, Practical Software Engineering for Statisticians taught by Murray Stokely of Google.

September 2013

13. P.Mean: Can I focus on a subset of conditions in my experiment? (created 2013-09-10). I got an email from a colleague who was running a 2 by 2 by 6 factorial design. Without giving up too much detail, let's say that the first factor was protein (Y or N), the second was oxygen level (normal or high) and the third was media type (A, B, C, D, E, and F). This person wanted to analyze a subset of factors. He wanted to look at the combinations protein=Y/oxygen=normal, protein=Y/oxygen=high, and protein=N/oxygen=high, but did not seem interested in looking at protein=N/oxygen=normal combination. Also he wanted to compare only four of the media types (B, C, D, and E). Was his approach valid?

12. P.Mean: Running JAGS from R, a simple example (created 2013-09-04). I was bemoaning the problems with BUGS yesterday, so today I investigated using JAGS instead. This is a stand-alone program, like BUGS, and also like BUGS it has an interface within R. I want to run from inside R so I can compare different models and run a few simple simulations. The first step, like the first step with BUGS was to run a simple beta-binomial model. This model is trivial, and does not need BUGS or JAGS or any other fancy package. It is just a quick way to test things.

11. P.Mean: Confusion about BUGS (created 2013-09-03). I dabble in various Bayesian statistical models, but the problem is that I get interested and start something, but then I get distracted and months or even years pass by before I look at this again. That makes it hard for me to make progress. One reason is that I have to relearn everything. That's not the biggest problem, though. I find when I return to the problem, that the world has changed around me. That appears to be true for a recent effort to run BUGS code that I had originally written in April 2012.

August 2013

10. P.Mean: I get a letter published in the Kansas City Star (created 2013-08-26). I try to write regularly to the Letters to the Editor page of the Kansas City Star. Most of the letters I write are about politics and are irrelevant to the topics on this web site. Today, though, I got a letter published about research.

9. P.Mean: Resource for statisticians called as legal experts in a trial (created 2013-08-14). I found a couple of nice PowerPoint slideshows that outline some of the issues that you should consider if you are hired to present an expert opinion about a statistical matter in a court of law.

8. P.Mean: Data sources for a proposed course on secondary data analysis (created 2013-08-07). I am giving a talk at the Joint Statistical Meetings (JSM) in Toronto. I'm still tweaking the slides just a few hours before the talk. The title is "Data sources for a proposed course on secondary data analysis." On this page, I want to provide a link to the PDF file of the slides and share a story about this talk.

July 2013

7. P.Mean: Calculating predicted probabilities from a logistic regression model (created 2013-07-31). Suppose you run a logistic regression model and want to take the coefficients from that model and do something useful with them. In particular, you want to see what your logistic regression model might predict for the probability of your outcome at various levels of your independent variable. Here's how you would do it.

6. P.Mean: R code for estimating the sample size of a clinical trial with a fixed duration (created 2013-07-29). Here is the R code for a simple Bayesian model for patient accrual. It estimates the sample size of a clinical trial for a fixed duration using information from a prior distribution and/or information from an interim review of accrual in the actual study.

5. P.Mean: R code for estimating the duration of a clinical trial with a fixed sample size (created 2013-07-29). Here is the R code for a simple Bayesian model for patient accrual. It estimates the duration of a clinical trial for a fixed sample size using information from a prior distribution and/or information from an interim review of accrual in the actual study.

April 2013

4. P.Mean: Counting squares (created 2013-04-02). The Harvard Business Review blog presented an image (see below) and asked you to count the number of squares in the picture, explain how you arrived at that number, and explain the "connection (if any) do you see between this exercise and breakthrough innovation." This was to be done in the comments section of the blog entry. Sometimes I like these exercises and sometimes not, but this one caught my attention, in part because I came up with an anser that I later realized was wrong. I was determined to do this well the second time around. I came up with 30 squares. Here's what I wrote.

March 2013

3. P.Mean: A complex subgroup definition (created 2013-03-25). I got a question about a complex definition of a subgroup for data in SPSS. I've changed a few details, but the gist of the question goes like this...

February 2013

2. P.Mean: Placing the mind of a statistician into software (created 2013-02-19). Someone asked about whether the American Statistical Association was going to "place the mind of a statistician into software." This means, I presume, creating a computerized system that could think like a statistician thinks. I was a bit skeptical and here is my dour reply.

January 2013

1. P.Mean: What does it really mean to say that a mean of a large number of variables is approximately normal (created 2013-01-14). Someone was looking at the Wikipedia page for the normal distribution and noted a comment that read "Normal distributions are extremely important in statistics, and are often used in the natural and social sciences for real-valued random variables whose distributions are not known.[1][2] One reason for their popularity is the central limit theorem, which states that, under mild conditions, the mean of a large number of random variables independently drawn from the same distribution is distributed approximately normally, irrespective of the form of the original distribution." What does this mean exactly?