Skip to content

Instantly share code, notes, and snippets.

View acarril's full-sized avatar

Alvaro Carril acarril

View GitHub Profile
@acarril
acarril / application-x-stata.xml
Created January 8, 2018 03:14
Stata .desktop files and mimetype definitions
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-stata-dta">
<comment>Stata data file</comment>
<glob pattern="*.dta"/>
<icon name="application-x-stata-dta"/>
</mime-type>
<mime-type type="application/x-stata-do">
<comment>Stata do file</comment>
<glob pattern="*.do"/>
@acarril
acarril / LaTeXTools.sublime-settings
Created January 5, 2018 23:19
LaTex.BibTeX.DVIPS.PS2PDF script builder for ST3 - LaTeXTools
"builder_settings" : {
// General settings:
// See README or third-party documentation
// (built-ins): true shows the log of each command in the output panel
"display_log" : false,
"options": ["--shell-escape"],
// Platform-specific settings:
@acarril
acarril / plotmissing.ado
Created December 13, 2017 13:55
Plot stacked missing and non-missing values over time (or some other discrete variable)
// Plot stacked missing and non-missing values over time (or some other discrete variable)
// Syntax: plotmissing var timevar
program define plotmissing
tempvar has hasnt
gen `has' = (!mi(`1'))
gen `hasnt' = (mi(`1'))
graph hbar (sum) `has' `hasnt', ///
over(`2', label(labsize(vsmall))) ///
stack legend(order(1 "Non-missing" 2 "Missing")) ///
subtitle(Relative frequency of non-missing '`1'')