programming

Shift Share Analysis Package I developed

Shift-share Analysis Package I developed During my career, I often have to deal with compositional & within group effects. For instance, the employment rate fell by 3% across 2 period. How much of it is due to an increase in employment rate within the sub-group and how much of it is due to compositional shift (for example ageing population). A formal way to explain these effects is known as shift-share analysis.

Automated Email Notification of my ETF watchlist

I wrote an automated email notification code to send out my daily ETF watchlist in csv - an extension of my ETF watchlist project here. I figured out that people will not visit my site. So why not blast out the watchlist instead:) And if you are interested in the code. Here you go. #Steps for sending watchlist library("rJava") library(‘mailR’) source("./R/emails.R") # Write the content of your email msg <- paste("Hey there, I’m sending this ETF watchlist that is updated as of ", "\n", as.

Naming Conventions in R. Let's call it JR Notations

Naming Conventions in R. Let’s call it JR Notations. ‘Naming conventions’ is a huge thing in many programming languages/ paradigms/ communities. But it’s noticeably absent in the R programming community. With some inspiration from the Hungarian Notation, here’s a blue-print that I came up with while working on a major R project over the last 2 months. Drumroll please… 1. Naming conventions for R scripts F_ for R scripts that contains functions.