My Julia DataFrames cheatsheet

Creating and calculating within groups In Stata: bysort group1 group2 (t): egen sum = sum(freq) generate prob = freq/sum bysort group1 group2: gen cumul = sum(prob) In Julia: sort!(df, ) df = transform(groupby(df, ), :freq => sum => :sum) df = df ./df df = transform(groupby(df, ), :prob => cumsum => :cumul) Collapsing data Stata: collapse (sum) freq, by(group) Julia:...

My R cheatsheet

data.table DescriptionR command(Stata command)Produce freq. table by groupdt tab groupCompute max of var per groupdt by group: g r_id = _n lubridate (w/ data.table) DescriptionR commandCreate Date from stringdt Convert Date to year-quarterdt[, yq := quarter(date_var, with_year=TRUE)Create Date from components (e.g., year-quarter from year and quarter)yq = quarter(parse_date_time(paste0(year,...

A macro-finance glossary

I've done some searching online, but so far failed to find any glossary of frequently used macro-finance term. So I started to put together my own. In my experience, a good way to memorize concepts is to write them down in my own words; as I revisit my glossary, I edit definitions, correct my previous misconceptions, and try to condens the text. It's not only a good way to retain the meaning of...