Jeromy Anglim's Blog: Psychology and Statistics

Tuesday, December 28, 2010

2010 in Review: 99 Most Popular Pages on Jeromy Anglim's Blog

In the spirit of taking stock of the year that's been, and in the spirit of festive television repeats, this post reviews 2010 for this blog.

Question and Answer Sites on Statistics, Computing, Research, and Psychology

This post sets out some of my favourite question and answer sites on topics related to statistics, computing, research, and psychology.

Monday, December 13, 2010

Video of Reproducible Research with R: Melbourne R Users 1st Dec 2010

As previously mentioned I gave a talk at Melbourne R Users Group titled "Reproducible Research and R Workflow". It covered technologies including LaTeX, Sweave, R, make, Eclipse, and git. This post shares the video.

Thursday, December 2, 2010

R Workflow: Slides from a Talk at Melbourne R Users (1st Dec 2010)

I gave a presentation at Melbourne R Users on the topic of R Workflow. The presentation covered R code organisation, and useful R related tools including Eclipse, StatET, Git, make, Sweave and LaTeX. Also, the slides from the presentation provide links to four complete examples of using R, Sweave, LaTeX, and make.

Tuesday, November 30, 2010

Sweave Tutorial 3: Console Input and Output - Multiple Choice Test Analysis

This post provides an example of using Sweave to perform an item analysis of a multiple choice test. It is designed as a tutorial for learning more about using Sweave in a mode where console input and output is displayed. Copies of all source code and the final PDF report is provided.

Monday, November 29, 2010

Sweave Tutorial 2: Batch Individual Personality Reports using R, Sweave, and LaTeX

This post documents an example of using Sweave to generate individualised personality reports based on responses to a personality test. Each report provides information on both the responses of the general sample and responses of the specific respondent. All source code is provided, and selected aspects are discussed, including makefiles use of \Sexpr, figures, and LaTeX tables using Sweave.

Getting Started with Git, EGit, Eclipse, and GitHub: Version Control for R Projects

This post provides information on
(a) installing Git using the Eclipse plugin Egit. (b) uploading repositories to GitHub, and (c) links to resources on Git, Git and LaTeX, and Git and R. The focus is on version control for people working on R, Sweave, and LaTeX related projects.

Saturday, November 27, 2010

Sweave Tutorial 1: Using Sweave, R, and Make to Generate a PDF of Multiple Choice Questions

In this post I present an example of using Sweave to prepare a PDF of formatted multiple choice questions. More broadly the example shows how to use Sweave to incorporate elements of a database into a formatted LaTeX document. It aims to be useful to anyone wanting to learn more about the almost magical powers of make, Sweave, and R.

Tuesday, November 23, 2010

makefiles for Sweave, R and LaTeX using Eclipse on Windows

This post provides a brief introduction to make and makefiles. In particular it describes how to set up make on Windows with an emphasis on using make in Eclipse on projects involving R, Sweave, and LaTeX.

Friday, November 12, 2010

Getting Started with Markdown: Benefits, Installation, Learning, and Conversion

I've recently adopted Markdown as a markup language for editing my blog posts. This post discusses (a) the benefits of Markdown, (b) installing a Markdown editor, (c) learning Markdown, and (d) converting between formats.

How to calculate confidence intervals of correlations with R

This post sets out how to calculate confidence intervals for correlations using R. Because I often get this question from people unfamiliar with R, it assumes no prior knowledge of R.

Saturday, October 23, 2010

Getting Started with Writing Mathematics in LaTeX

LaTeX and mathematics go well together. At the risk of preaching to the converted, this post sets out (a) reasons to learn to write mathematics in LaTeX, (b) a few free internet guides on learning to write mathematics in LaTeX, (c) several internet resources which can facilitate writing mathematics in LaTeX.

Wednesday, August 25, 2010

Getting Started with Beamer: Tips and Tricks for LaTeX Presentations

This post provides a guide to getting started with Beamer, a popular LaTeX package for preparing slide presentations. The post: (a) Lists some of the benefits of Beamer in comparison to PowerPoint; (b) Links to tutorials and suggestions for learning Beamer for both people who do and do not know LaTeX; (c) Documents problems that I encountered when learning to use Beamer and the solutions that I developed to overcome them.

Simple Beamer Template for Getting Started and Reducing Typing

For those who don't already know, Beamer is a useful package in LaTeX for preparing slide presentations. I have a Beamer template of preamble and slide templates. I found having a template was useful: (a) when first learning Beamer commands, and (b) in order to save typing. Thus, this post shares and explains the template in case it was of interest to others. It includes both my standard preamble and templates for individual slides. It is designed so that it is easy to compile both a presentation and a 2 x 2 handout.

Thursday, August 5, 2010

Free Online Videos on Mathematical Statistics from UCCS

For some time I've been searching for online video courses on mathematical statistics. I previously posted a list of mathematics video courses. However, this previous list focused on introductory mathematics courses (e.g., calculus and linear algebra) and introductory probability and statistics. This previous list did not include more sophisticated mathematical treatments of statistics. Thus, I was pleased to discover the UCCS Department of Mathematics Video Archive.

Friday, July 30, 2010

How to Edit Text Faster on Windows by Updating Key Bindings

The following post sets out one way of binding the navigation keys to convenient keys on the keyboard on Windows. The approach means that I don't have to move my hands from the home keys position (i.e., JKL;) when switching between entering text and moving the cursor.

Monday, July 19, 2010

How to Process Inquisit Raw Data in SPSS

This post provides advice for processing and importing raw data from Inquisit into SPSS. It is also relevant to importing Inquisit data into other data analysis packages.

Thursday, June 17, 2010

Canonical Correlation: Getting Started with R or SPSS

Canonical correlation is a method of modelling the relationship between two sets of variables. This post provides: (a) Examples of when canonical correlation can be useful; (b) Links to good online resources where you can learn about the technique; (c) Links to examples of running the analysis in R or SPSS; and (d) Examples of articles showing how to report a canonical correlation analysis.

Wednesday, June 2, 2010

More Free Online Instructional Videos on R

I previously posted a set of links to online videos on R. I organised videos into three categories: (1) what is R; (2) how to do basic data analysis in R; and (3) how to use intermediate and advanced tools in R. Since writing the post I've discovered six or seven additional sources of videos. Each source has multiple videos (over 20 in one case). The majority of the links I've added are in the "how to do basic data analysis" category. It's great to see so many people sharing videos on R. Given the healthy number of introductory-level videos, it would be great to see more videos designed for the intermediate to advanced level. See my updated post for the full list of links to these additional videos.

Monday, May 24, 2010

Great Measurement but Small Sample Size: Case Study of Videotaped Families

New York Times reports on an interesting UCLA study that involved video taping 32 Los Angeles families over the course of a week. The study generated rich data for analysis. It's great to see researchers moving beyond self-report measures towards real-world well-coded behavioural observations. However, great measurement does not overcome issues of a small sample size.

Thursday, May 20, 2010

Inverting a Logistic Function

I was recently talking to a researcher who had conducted a cognitive experiment that involved experimentally manipulating a variable x, a continuous property of a stimulus, looking at the effect on a variable p, the probability of giving a response. The function p(x) was assumed to be a logistic function. The researcher wanted to know how to calculate the point on x at which the fitted logistic regression function equalled 0.5.

Fitting Nonlinear Regression Models to Multiple Participants Using SPSS

This post briefly discusses how to run a nonlinear regression in SPSS. Specifically, it discusses the scenario where you have a a set of k observations for each of n participants, and where your aim is to fit a nonlinear function to the data of each participant in order to save the parameter estimates for subsequent analysis. This is a relatively common task in psychology. You have multiple participants measured on a numeric repeated measures variable and you want to see how a dependent variable is related to this repeated measures variable. And you want to do this separately for each participant. For example, you might be modelling performance as a function of practice or accuracy as a function of stimulus intensity.

Sunday, May 16, 2010

A 34 Minute Video on Using R to Analyse Winter Olympic Medal Data

In this post I present a 34-minute video on using R. The video is based on an analysis of 1924 to 2006 Winter Olympic Medals that I presented previously in text form. The video aims to to show what an interactive session in R might look like using StatET and Eclipse.

Monday, May 10, 2010

Abbreviations of R Commands Explained: 250+ R Abbreviations

The R programming language includes many abbreviations. Abbreviations exist in function names, argument names, and allowed values for arguments. This post expands on over 150 R abbreviations with the aim of making it easier for users new to R who are trying to memorise R commands.

Wednesday, May 5, 2010

Statistical Power Analysis in G*Power 3

G*Power 3 is an excellent piece of software for performing statistical power analysis. It is particularly useful for applied researchers who need to perform a power analysis as part of their research. The software is free, runs on Windows, and provides a user friendly GUI. G*Power 3 can be downloaded here This post discusses the features of G*Power 3 and provides examples of some of the useful plots that can be generated.

Videos on Data Analysis with R: Introductory, Intermediate, and Advanced Resources

If you want to learn about R through videos, there are now a large number of options. This post provides links to many of these video under the headings of: (a) What is R? (b) Introductory R, and (c) Intermediate and Advanced R.

Friday, April 23, 2010

Advocating Increased Usability for Full-Text Institutional Journal Access: It's about Speed

The following sets out how I'd like to see access improved for full-text journal articles where an institutional subscription applies. 

Implications of Office Layout and Building Design for Social Networks

This post presents some rough notes reviewing the literature related to office layout and building design and the implications for social network formation and organisational performance.

Thursday, April 22, 2010

Free Video Courses on R, Structural Equation Modelling, Causal Inference, and Regression from Uni Jena

The Department of methodology and Evaluation Research at Universit├Ąt Jena has made available a set of free online video courses on data analysis. They cover topics that are particularly relevant to psychology and social science researchers, including SEM, causal inference, regression, R, and psychometrics. Some courses are in German, but many are in English, and the language of the course is clearly marked. Some require that you register, but registration is free. Their website allows you to filter just for English Language courses. Below are some courses that I found particularly appealing.

Wednesday, April 21, 2010

WinEdt 6.0 for LaTeX: Features, Configuration, and Resources

This post discusses my experience with WinEdt 6.0 as a text editor for writing documents in LaTeX. In this post I outline: (a) Why I have chosen to use WinEdt; (b) The role of WinEdt in my workflow; (c) Various customisations of WinEdt which I have found useful; (d) links to additional resources for getting the most out of WinEdt.

Tuesday, April 20, 2010

Evaluating PubGet: A Tool for Obtaining Full-Text PDF Journal Articles Quickly

This post discusses and evaluates the use of PubGet for quickly obtaining full-text PDF journal articles via institutional subscriptions.

Monday, April 19, 2010

How to get Quick Access to Full Text Journal Articles using Google Scholar

This post presents strategies for accessing proprietary full text PDF journal articles in ways that minimise the number of steps. It assumes that you have institutional access.

Saturday, April 17, 2010

Bundles of RSS feeds for I/O Psychology Journals and Data Analysis Blogs

This post provides links to sets of RSS feeds on psychology journals, I/O psychology journals, and assorted blogs. If you are new to RSS and you have similar interests to me, you may find them a useful way to get started with RSS feeds using Google Reader.

Friday, April 16, 2010

Keeping up to date with journal articles using RSS feeds and Google Reader

If you're an academic researcher, it's important to keep up with the literature in your field. I've recently been thinking about the best way to do this. The following post discusses one aspect of my current strategy involving the use of Google Reader and RSS feeds of journals.

Monday, April 12, 2010

Exporting PDFs from JabRef using a Batch File

If you do research, JabRef is a great tool for managing a personal repository of PDFs. JabRef allows you to link your citations with full text PDFs. This post discusses one way of exporting a subset of your PDF repository using JabRef, Excel, and a Windows Batch file. This is useful (copyright permitting) in many situations.
For example:
(a) You need to extract a subset of references for a subject you are teaching.
(b) You need to give a colleague or research student a subset of your references.
(c) You want to transfer a subset of your references to another device or computer.

Friday, March 26, 2010

Causal Inference from Aggregate Data: The Facebook Syphilis Case Study

The Age has an article on the reported connection between using Facebook and Syphilis that is doing the rounds on the Internet. While the idea that Facebook is facilitating social connections seems plausible. And while Facebook may play a role in facilitating risky sexual encounters, the evidence offered (at least that presented in the news reports) for the connection is poor, and provides a good case study in how NOT to reason from data.

Wednesday, March 24, 2010

Updated Site Map for Jeromy Anglim's Blog Psychology and Statistics

Every Six months or so I like to update the Site Map for my blog . Thus, if you're new to the blog, The Site Map provides an overview of previous blog content organised by topic.
RSS Feed:


Friday, March 19, 2010

TeXnicCenter Customisations

Over the last few weeks I've been exploring text editors for writing LaTeX documents. I wrote these notes when I was using TeXnicCenter (version 1.0). I have since switched to using WinEdt for writing LaTeX documents. If you do any substantial writing in LaTeX and you are choosing between free TeXnicCenter and shareware WinEdt, buy WinEdt. I'm planning a post soon on WinEdt. Nonetheless, I thought I'd post these rather rough notes I made while playing around with TeXnicCenter in case they are of interest.

Monday, March 15, 2010

APA Style References in LaTeX

This post discusses my experience getting APA style references in LaTeX. This includes both in-text citations and the end of document references list. It focuses on the use of the apacite package.

Converting a Microsoft Word Document into a LaTeX Document

This post discusses my experience converting a large MS Word document into a LaTeX document using Word-to-LaTeX. Along the way I encountered several challenges. I thought I'd document them in case it may be of interest to others.

Export from Endnote to BibTeX, JabRef, and LaTeX

This post sets out a procedure that I used to migrate a large set of Endnote references in a Word Document to a Latex document with BibTeX references in JabRef. In particular, it sets out (1) how to export an Endnote database into BibTeX format ready for inclusion in a LaTeX document; and (2) how to modify an existing document with Endnote citations into a document that cites the BibTeX database.

Wednesday, March 10, 2010

Using Regular Expressions in R: Case Study in Cleaning a BibTeX Database

I recently had to clean up a BibTeX database containing around 1,000 references. One of the clean up tasks was to ensure that page numbers were separated with en-dashes as opposed to hyphens. This post sets out how I used regular expressions in R to complete the task and check the results. I also hope to highlight the general power of string manipulation in R.

Tuesday, March 9, 2010

Running Command Line Programs in Windows

Many of the major open source programs that I use (e.g., R, LaTeX, Eclipse) run on Windows, Linux, and Mac. These programs tend to be designed for sophisticated computer users. Among other things, assumptions are often made about knowledge of the command line. What is second nature for a Linux user may be novel to a non-technical Windows user. One of the aims of this blog is to facilitate the use of these open source tools by social science researchers. Thus, this post sets out a few ideas related to running programs at the command line, which I have found useful when working with programs like R, Eclipse, and TexnicCenter.

Monday, March 8, 2010

Choosing an Auto Generation Pattern for BibTeX Keys in JabRef

This post discusses the issue of choosing a default pattern for the BibTex key generator in JabRef.

Friday, February 26, 2010

Clustered Samples and Assuming Independence of Observations

I sometimes speak to researchers who have a design where units are nested within clusters (e.g., 200 employees nested within 50 stores). While this is often called cluster sampling, the research that this post addresses is often more about convenience than about following a rigorous sampling plan. At some point, the researchers discover that this clustering has implications for the assumption of independence of observations, which in turn has implications for the validity of standard statistical techniques, such as t-tests and regressions that assume independence. This post discusses what to do in such a situation and when if ever it is appropriate to ignore the clustered nature of the sampling.

Tuesday, February 23, 2010

Getting Started with Sweave: R, LaTeX, Eclipse, StatET, & TeXlipse

Being able to press a single button that runs all your statistical analyses and integrates the output into your final report is a beautiful thing. If you have not already heard, this is what Sweave can do for you. However, getting your computer to run Sweave can be a little bit fiddly. Thus, this post: (1) sets out the benefits of Sweave; (2) sets out how to install and configure R, Sweave, and Eclipse on Windows; (3) lists resources for people wanting to learn more about how to use LaTeX and Sweave; and (4) lists some specific resources relevant to researchers in psychology wanting to use these tools.

Thursday, February 18, 2010

Analysis of Winter Olympic Medal Data Using R

The Winter Olympics are on. The Guardian's DataBlog has graciously compiled a database on Winter Olympic Medals. Thus, I thought I'd run a few quick analyses on the data in R. In this post I was hoping to show how one could quickly churn out some basic analyses (and answer some interesting questions) using R.

Tuesday, February 16, 2010

A Case Study in Optimising Code in R

This post presents an experience I had optimising the efficiency of code for a data analysis task in R. I'm not an expert in programming nor code optimisation. However, I thought my experience might make an interesting case study for others at a similar level in their R programming development. The post sets out: (1) the context of the problem; (2) the strategies and tools in R that I used to diagnose the problem and optimise the code; (3) some lessons learnt from the experience; and (4) some links to additional resources.

Tuesday, January 19, 2010

Bookmarklets to Improve the Browsing Experience

Bookmarlets can improve the browsing experience. This post lists bookmarklets that I regularly use.

Friday, January 15, 2010

Free Online Mathematics Books

I found a great list of free online mathematics books.

Thursday, January 14, 2010

Tips on Reading Mathematics for the Non-Mathematician

This post provides a few tips on reading a mathematics text book or other mathematical material such as a journal article that includes mathematics. In particular I wrote this post for social science researchers with less training in mathematics but who are otherwise motivated to learn mathematical material. It also offers useful links to other guides on reading mathematics.