I recently wrote a review of Understanding psychology as a science: an introduction to scientific and statistical inference by Zoltan Dienes (2008). Dienes' book covers Neyman-Pearson null hypothesis significance testing, Bayesian inference and the likelihood method of inference (inspired by Fisher and associated with A. W. F. Edwards and more recently R. Royall).

One of the most useful features of the book is that Dienes provides Matlab code for examples of calculations in the book (e.g., for Bayes factors, likelihood intervals and so forth). This is not so useful for me because I don't use Matlab. Matlab licenses are also quite expensive and may not be possible for students to access it in many Psychology departments. For those without access to Matlab, Dienes also provides calculators for a number of functions on his own web page for the book. (The calculators are found by following the links to the appropriate chapter, so the Bayes factor calculator is found by following the Chapter 4 link).

Danny Kaye and I thought it would be useful to write R code to compliment the Matlab code for Dienes' functions as a 'bonus feature' for the review. As these functions and the notes for them take up quite a bit of space we decided to include only one, for a Bayes factor, in the review itself (with some notes on how to use it). Danny did most of the work writing functions, which are more-or-less direct translations of the original Matlab code (and have been checked against the web versions). The full set of functions is hosted on his web site along with the notes on how to use them. Also included are page references for the examples in the book.

Why did we write the R functions? First, they offer convenient access to the functions for teachers and students (because R is free and runs on Windows, Mac OS or Linux operating systems). Second, it reduces the burden on Dienes' web calculator (at a marginal decrease in ease of use). Third, R is open source so it is simple to see how the code works and to edit, extend or adapt it (though it is polite to acknowledge the authors of the original code). Fourth, we want to encourage more people to start using R!

As an example, I've already written some alternative functions for likelihood intervals (though as I happened I re-wrote these almost from scratch to get them to plot the likelihood function and interval and to take advantage of some built-in R functions). Those functions are intended for a the book I'm working on and so should appear in due course.

For those who are interested Danny and I are presently working on implementing Bayesian t tests in R (Bayes factors with objective priors) in a user-friendly way for researchers.


References:

Baguley, T., & Kaye, W.S. (in press, 2009). Review of Understanding psychology as a science: An introduction to scientific and statistical inference. British Journal of Mathematical & Statistical Psychology.

0

Add a comment

I have been thinking to write a paper about MANOVA (and in particular why it should be avoided) for some time, but never got round to it. However, I recently discovered an excellent article by Francis Huang that pretty much sums up most of what I'd cover. In this blog post I'll just run through the main issues and refer you to Francis' paper for a more in-depth critique or the section on MANOVA in Serious Stats (Baguley, 2012).
2

I wrote a brief introduction to logistic regression aimed at psychology students. You can take a look at the pdf here:  

A more comprehensive introduction in terms of the generalised linear model can be found in my book:

Baguley, T. (2012). Serious stats: a guide to advanced statistics for the behavioral sciences. Palgrave Macmillan.

I wrote a short blog (with R Code) on how to calculate corrected CIs for rho and tau using the Fisher z transformation.

I have written a short article on Type II versus Type III SS in ANOVA-like models on my Serious Stats blog:

https://seriousstats.wordpress.com/2020/05/13/type-ii-and-type-iii-sums-of-squares-what-should-i-choose/

I have just published a short blog on the Egon Pearson correction for the chi-square test. This includes links to an R function to run the corrected test (and also provides residual analyses for contingency tables).

The blog is here and the R function here.

Bayesian Data Analysis in the Social Sciences Curriculum

Supported by the ESRC’s Advanced Training Initiative

Venue:           Bowden Room Nottingham Conference Centre

Burton Street, Nottingham, NG1 4BU

Booking information online

Provisional schedule:

Organizers:

Thom Baguley   twitter: @seriousstats

Mark Andrews  twitter: @xmjandrews

The third and (possibly) final round of the workshops of our introductory workshops was overbooked in April, but we have managed to arrange some additional dates in June.

There are still places left on these. More details at: http://www.priorexposure.org.uk/

As with the last round we are planning a free R workshop before hand (reccomended if you need a refresher or have never used R before).

In my Serious Stats blog I have a new post on providing CIs for a difference between independent R square coefficients.

You can find the post there or go direct to the function hosted on RPubs. I have been experimenting with knitr  but can't yet get the html from R Markdown to work with my blogger or wordpress blogs.
1
Links
Blog Archive
Subscribe
Subscribe
About Me
About Me
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.