Publications by Timothy Lin
Update on the SG Economic Dashboard
I have updated the SG-Dashboard with 2Q 2017 numbers. I also took the opportunity to add in a few new tables and charts. There is a new table that keeps track of value-added (VA) revisions of last quarter’s result. VA for certain industries such as construction are approximated based on early indicators and the actual numbers take a quarter or ...
1593 sym
Thesis Thursday 7 – Conclusion
Finally, the last installment of the Thesis Thursday series! Rather than going through what I have done since the previous post (basically more refinements and robustness checks), I decide share some miscellaneous thoughts and lessons learnt over the past few months. The completed research paper and accompanying slides can be downloaded from my w...
3998 sym
Mapping the Distribution of Religious Beliefs in Singapore
Inspired by my thesis, I have been playing around with mapping tools over the past few days. While the maps showing the distribution of migrant groups across the United States did not make it to the final copy of my paper I had fun toying around with the various mapping packages. In this post, I decided to apply what I have learnt and take a look...
7040 sym R (4535 sym/8 pcs) 8 img 1 tbl
Examining the Changes in Religious Beliefs – Part 2
In a previous post, I took a look at the distribution of religious beliefs in Singapore. Having compiled additional characteristics across 3 time periods (2000, 2010, 2015), I decided to write a follow-up post to examine the changes across time. The dataset that I will be using is aggregated from the 2000 and 2010 Census as well as the 2015 Gener...
5890 sym R (4316 sym/10 pcs) 10 img
Using Leaflet in R – Tutorial
Here’s a tutorial on using Leaflet in R. While the leaflet package supports many options, the documentation is not the clearest and I had to do a bit of googling to customise the plot to my liking. This walkthrough documents the key features of the package which I find useful in generating choropleth overlays. Compared to the simple tmap approa...
2421 sym R (831 sym/3 pcs)
Mapping SG – Shiny App
While my previous posts on the Singapore census data focused mainly on the distribution of religious beliefs, there are many interesting trends that could be observed on other characteristics. I decided to pool the data which I have cleaned and processed into a Shiny app. Took a little longer than I expected but it is done. Have fun with it and h...
805 sym
Choosing a Control Group in a RCT with Multiple Treatment Periods
Came across a fun little problem over the past few weeks that is related to the topic of policy impact evaluation – a long time interest of mine! Here’s the setting: we have a large population of individuals and a number of treatments that we want to gauge the effectiveness of. The treatments are not necessarily the same but are targeted towa...
10139 sym R (2798 sym/7 pcs) 2 img
Dashboard 2.0
SG Dashboard 2.0 is now released and updated with Q3’s economic results. Built on R’s flexdashboard with interactive graphs on Plotly. My take on bringing statistical releases to the digital age. Related To leave a comment for the author, please follow the link and comment on their blog: R on Quasilinear Musings. R-bloggers.com offers dai...
602 sym
Applications of DAGs in Causal Inference
Introduction Two years ago I came across Pearl’s work on using directed cyclical graphs (DAGs) to model the problem of causal inference and have read the debate between academics on Pearl’s framework vs Rubin’s potential outcomes framework. Then I found it quite intriguing from a scientific methods and history perspective how two different ...
24293 sym 28 img
Visualising Networks in ASOIAF
While waiting for the winds of winter to arrive, there is plenty of time to revisit the 5 books. One of my favourite aspects of the series is the character and world building. As the song of ice and fire universe is so big, many characters are mentioned in passing while the major characters meet each other only occasionally. I thought it would be...
9096 sym R (8115 sym/20 pcs) 16 img