January 2015 M T W T F S S « Jun 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Categories

Recent Posts
Meta
Social science
Statistics
Author Archives: Jason
Boolean 3 (finally) on CRAN
I have finally managed to get boolean3 accepted to CRAN. You can find it here: boolean3 on CRAN. To summarize: boolean3 provides a means of estimating partialobservability binary response models following boolean logic. boolean3 was developed by Jason W. Morgan under the … Continue reading
Posted in Data analysis, R
Leave a comment
The Latent Path Model for Social Networks: Polmeth 2013 poster
I was lucky to have the chance to attend Polmeth 2013 at the University of Virgina this July. In addition to presenting a paper with Luke Keele, I also presented a poster related to my dissertation project, titled “The Latent … Continue reading
Posted in Network analysis, Research
Leave a comment
Pearson’s r: Not a good measure of electoral persistence
Pearson’s productmoment correlation, \(r\), is an incredibly useful tool for getting some idea about how two variables are (linearly) related. But there are times when using Pearson’s \(r\) is not appropriate and, even if linearity and all other assumptions hold, … Continue reading
Posted in Data analysis, Graphics, Poland, Political parties, R
3 Comments
R Tip: Avoid using T and F as synonyms for TRUE and FALSE
By default when you start R, T and F are defined as TRUE and FALSE. When I review other people’s code, I often see functions defined with arguments set to these values by default. This is a very bad idea. … Continue reading
Closures in R: A useful abstraction
People who have been using R for any length of time have probably become accustomed to passing functions as arguments to other functions. From my experience, however, people are much less likely to return functions from their own custom code. … Continue reading
Filtering a list with the Filter higherorder function
Last week markbulling over at Drunks & Lampposts posted a method of using sapply to filter a list by a predicate. Today the @RLangTip tip of the day was to use sapply similarly. This made makes me wonder if R‘s … Continue reading
Posted in R
Leave a comment
Announcing boolean3 (beta)
After entirely too long, I am happy to announce the beta release of boolean3, an R package for modeling causal complexity. The package can be downloaded at the following links: Unix/Linux: boolean3_3.0.20.tar.gz Windows: boolean3_3.0.20.zip (Please let me know if you have any … Continue reading
Posted in Code, R
2 Comments
Welford’s method for calculating the sample variance: An implementation in Scheme
John Cook has three entries up on his blog discussing the pitfalls of calculating the sample variance using the mathematical textbook definitions. He provides a Monte Carlo comparison of methods here, and a theoretical discussion here. He also provides a … Continue reading
Posted in Code, Data analysis, Scheme
Leave a comment
Three free books for better programming in R (and any other language)
Like many users and producers of R packages, I have never had any formal training in computer science. I’ve come to to the conclusion that this is a serious omission in a professional researcher’s training. Computer scientists and professional hackers … Continue reading
Posted in Hacking, R
4 Comments
The performance cost of a forloop, and some alternatives
I’ve recently been spending a lot of time running various simulations in R. Because I often use snow to perform simulations across several computers/cores, results typically come back in the form of a list object. Summarizing the results from a list … Continue reading
Posted in R
10 Comments