Monthly Archives: October 2009

Expressions in expresssion passed to functions that return functions

October 5, 2009
By

OK in the last two tips I explained how functions can return functions and how to leverage expressions. Now lets get complicated. This is really how my testing code works; expressions embeded in expressions that are passed to functions that return fu...

Read more »

Expressions!

October 5, 2009
By

I never really saw a use for these until I started testing code en mass. I found myself doing lots and lots of copy and paste. I heard it from Steve McConnell in his Code Complete book where he said if you are copying and pasting you are programming ...

Read more »

Functions from functions

October 5, 2009
By

I've been really busy lately working on my dissertation and applying for jobs. But I've found a few really cool things that I'd like to share. These are pretty complex things so lets break it up into a few tips. First Tip: did you know that you can re...

Read more »

Oil vs gas

October 5, 2009
By
Oil vs gas

Recently, friend of my, got investment advise from his broker – long gas, because the price of gas is very low compared to oil. The broker didn’t indicate neither profit target or stop loss… I got hooked on the idea. First of all, I ran linear regression on monthly prices of oil and gas from 01-12-1993 to

Read more »

Including R Code in a Blog Post

October 5, 2009
By
Including R Code in a Blog Post

This post discusses ways of including formatted code in a blog post.I often write posts that include computer code. This might be R code, SPSS syntax, an Inquisit script, or a Visual Basic Macro.The Problem:Initially I did not know how to include this ...

Read more »

Using R to Analyze Baseball Games in “Real Time”

October 4, 2009
By

This post originally appeared on my Wordpress blog on October 4, 2009. I present it here in its original form. In order to honor the last day of the 2009 MLB regular season (excepting the Twins/Tigers tiebreaker Tuesday night), I was reading...

Read more »

Using R to Analyze Baseball Games in “Real Time”

October 4, 2009
By

This post originally appeared on my Wordpress blog on October 4, 2009. I present it here in its original form. In order to honor the last day of the 2009 MLB regular season (excepting the Twins/Tigers tiebreaker Tuesday night), I was reading...

Read more »

Using R to Analyze Baseball Games in “Real Time”

October 4, 2009
By
Using R to Analyze Baseball Games in “Real Time”

In order to honor the last day of the 2009 MLB regular season (excepting the Twins/Tigers tiebreaker Tuesday night), I was reading a book that combines a few of my favorite thing: statistics, R, and baseball. The book, by Joseph Adler, is called Baseball Hacks, and I highly recommend it if you are interested in

Read more »

Calculating Scale Scores for Psychological Tests

October 4, 2009
By
Calculating Scale Scores for Psychological Tests

This post discusses how to calculate scale scores for multi-item scales. A lot of psychological research uses multi-item scales (e.g., personality tests, symptoms check lists, surveys, etc.). This post focuses on the issues involved with computing thes...

Read more »

Using doc-view with auto-revert to view LaTeX PDF output in Emacs

October 3, 2009
By
Using doc-view with auto-revert to view LaTeX PDF output in Emacs

When I am authoring a document in Emacs, such as a report or my CV, it is useful for me to compile the source file periodically to see what the resulting file PDF looks like. I used to run a separate PDF viewer to look at the output, but I now have a complete Emacs

Read more »