Blog Archives

A Stata HTML syntax highlighter in R

August 12, 2013
By

So I have been having difficulty getting my Stata code to look the way I want it to look when I post it to my blog.  To alleviate this condition I have written a html encoder in R.  I don't know much about html so it is likely to be a little ...

Read more »

Item Equating with same Group – SAT, ACT example

August 5, 2013
By
Item Equating with same Group – SAT, ACT example

# Item equating is the practice of making the results from two # different assessments equivalent. This can be done by either# 1. having the same group take both assessments# 2. having equivalent groups take the different assessments# 3. having non-eq...

Read more »

Power Analysis by Simulation: R, RCT, Malaria Example

July 24, 2013
By
Power Analysis by Simulation: R, RCT, Malaria Example

I have received a number of requests for demonstration code on how to perform a power analysis using simulation in R.  I have already demonstrated howto do this in Stata but lacked the easy to use Stata command “simulate” that I preferred.  However, in a recent post I have written up a command very similar to simulate in...

Read more »

Loading up your custom toolkits at startup – R

July 22, 2013
By

If you are anything like me then you have dozens if not hundreds of personal functions that you have written to accomplish a number of tasks.  Many of the tasks that you would like to do are similar to previous tasks that you have already done. &n...

Read more »

Simulation of Blackjack: the odds are not with you

July 19, 2013
By
Simulation of Blackjack: the odds are not with you

I often want to simulate outcomes varying across a set of parameters. In order to accomplish this in an efficient manner I have coded up a little function that takes parameter vectors and produces results. First I will show how to set it up with some d...

Read more »

A Sudoku Puzzle Solver – attempt 1

July 9, 2013
By
A Sudoku Puzzle Solver – attempt 1

I have programmed up a R based Sudoku problem solver for Sudoku puzzles of that only require simple inference.  In these puzzles a solution can be found using only first order inference.  This solver can be found at the end of the code locate...

Read more »

Optimal Pricing for a Simple Monopolist

July 5, 2013
By
Optimal Pricing for a Simple Monopolist

# A single price monopolist is a monopolist because it is the only supplier of a particular product. The monopolist therefore has the power to choose a price to sell the product at. # Those who have a willingness to pay which is greater than the ...

Read more »

Zombie Apocalypse Survival Test – R-Powered (using Concerto)

June 17, 2013
By
Zombie Apocalypse Survival Test – R-Powered (using Concerto)

This test is the first attempt to seriously assess the ability of individuals to survive a zombie apocalypse.  This test is administered using the R powered open-source testing platform Concerto developed at the University of Cambridge. The t...

Read more »

Sudoku Automation Solver Challenge – R

June 14, 2013
By
Sudoku Automation Solver Challenge – R

On a recent flight I was bored waiting for the plane to land and I tried out the electronic sudoku game that they had offered.  I found the game surprisingly interesting as I realized that it is far more entertaining when you cannot use paper or p...

Read more »

More explorations of Shiny

June 11, 2013
By
More explorations of Shiny

I have continued to explore the functionality of the Shiny package released by the Rstudio team and I have been increasingly impressed.  The code fits together very clean and easy to manipulate or add to.  If you have some knowledge of html o...

Read more »