Publications by Francis Smart
Loading up your custom toolkits at startup – R
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. So how are you going to bridge the functions across your disjoint projects?There are a f...
2487 sym R (570 sym/2 pcs)
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 R called SimpleSim...
2762 sym R (4886 sym/2 pcs) 4 img
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-equivalent groups which use common items take the different # assessments. # In this post ...
446 sym R (4603 sym/2 pcs) 2 img
A Stata HTML syntax highlighter in R
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 clunkier in terms of tags than it need be. It still needs some work but I thought to pos...
1583 sym R (6585 sym/2 pcs)
Question and Answer: Generating Binary and Discrete Response Data
I was recently contacted by a reader with two very specific questions and I thought that this would be a good topic to publicity respond to. He would like to simulate his data:I have firm level data and the model is discrete choice with the main explanatory variable also a binary choice: First question is how can I calibrate the da...
2425 sym
Export R Results Tables to Excel – Please don’t kick me out of your club
This post is written as a result of finding the following exchange on one of the R mailing lists:Is-there-a-way-to-export-regression-output-to-an-excel-spreadsheetQuestion: Is there a way to export regression output to an excel spreadsheet?Translation: I would like to be able to do a very simple thing that almost any statistical progr...
4716 sym R (63 sym/1 pcs) 4 img
Doodling in R!
# I am working on creating some functions that will be capable of creating shapes and plots that look hand drawn. # I have made some progress in this goal. # In that process I have also discovered that I can make some doodles that look hand drawn as well. # In order to accomplish the goal of simulating hand drawing I want to simulate the momen...
409 sym R (2975 sym/4 pcs) 6 img
Making regex examples work for you!
One of the most frequently used string recognition algorithms out there is regex and R implements regex. However, users can often be frustrated with how despite taking examples verbatim from many sources such as stackoverflow they do not seem to work. From my own experience, I have found that the largest issue is really about what...
2114 sym
ThinkNum – A new interactive public database and graphing tool!
Thinknum.com is a new free data service similar to Quandl.com in that they organize and list publicly available data sets. Currently they are using data from 2,000 data sources which sounds good compared with Quandl’s 400+ source. Overall, in terms of data points, I don’t know which has more. But that is not really the point.What it doe...
5005 sym 8 img
Maximum Likelihood Estimation and the Origin of Life
# Maximum likelihood Estimation (MLE) is a powerful tool in econometrics which allows for the consistent and asymptotically efficient estimation of parameters given a correct identification (in terms of distribution) of the random variable. # It is also a proceedure which seems superficially quite complex and intractible, but in reality is very ...
3 sym R (7543 sym/1 pcs)