Articles by Mark Fredrickson

test_that — A brief review

July 15, 2011 | 0 Comments

For the last month or so, I have been using the test_that unit testing package for R (a quick note on names: both testthat and test_that are used in the documentation. The library, as available from CRAN has no underscore, so use install.packages('testthat') to get a ... [Read more...]

Optmatch and RItools — New homes and techniques

June 2, 2011 | 0 Comments

Co-developers Jake Bowers, Ben Hansen and I are happy to announce that our R packages optmatch and RItools have new homes on GitHub. We had previously been managing development on private subversion repositories and managed the projects through an ad-h... [Read more...]

Peeking inside R functions

February 6, 2011 | 0 Comments

R, like all good programming languages, treats functions as first class objects. Users can create functions, pass them as arguments, and have them returned as the result of other computations. You may be familiar with passing functions as arguments if you have used the apply family of functions (i.e. ... [Read more...]

Speeding up Optmatch while improving match quality

November 12, 2010 | 0 Comments

“Fast, cheap, correct: Pick two.” Does this phrase apply to statistical matching algorithms? In the case of Optmatch, you can have all three. “Cheap” is easy: it is open source. You can download it for free. Today I’m going to explain how to make the matching process both faster ... [Read more...]

Combinadics in R

August 5, 2010 | 0 Comments

A question on stats.stackexchange.com reminded me of some code I wrote earlier this summer. The code provides a correspondence between the natural numbers 1 to (N choose K) and all the unique K sized combinations one could draw from N items. This relationship is know as the combinadic of ... [Read more...]

Using xBalance with MatchIt

August 1, 2010 | 0 Comments

In a previous post, I demonstrated how to create a propensity score matching, test balance, and analyze the outcome variable using the optmatch and RItools packages. The same strategy can be used with other matching algorithms, for example the various methods included in the MatchIt package. I’ll use the ... [Read more...]

Using Optmatch and RItools for Observational Studies

July 29, 2010 | 0 Comments

I am a contributor to the optmatch and the RItools packages for R. These two packages are separate, but complimentary. Both packages provide tools for adjusting observational data to exhibit “balance” on observed covariates. In a randomized control trial, treatment and control groups should have identical distributions over all covariates, ... [Read more...]

Scoping Bugs

June 22, 2010 | 0 Comments

I ran a across a strange bug in R recently. Like all the best programming languages, R treats functions as first class objects. That is to say that functions can be passed as arguments and return values from functions, named as variables, and, while not part of the strict definition ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)