Skip to content

Instantly share code, notes, and snippets.

View nickbloom's full-sized avatar

Nick Bloom nickbloom

View GitHub Profile
@nickbloom
nickbloom / gist:decdedc75268996b7621
Last active August 29, 2015 14:22
Load a DTA file, without labels
# Install and Load Packages
install.packages('haven')
library('haven')
install.packages('stringr')
library('stringr')
# Record the function
import sublime, sublime_plugin
from origami import TravelToPaneCommand
'''
# WHAT IT DOES
One of three things:
1. If only one pane is open, it creates a new pane and initializes the R REPL
2. If two panes are open and no R REPL process is running, it creates a new R REPL in the newest pane
@nickbloom
nickbloom / lmerxtable.R
Created March 21, 2014 21:35
Getting xtable to play nicely with lmer output in R
library(arm)
library(lmer)
library(xtable)
# This is only for fixed effects, so it's kind of a hacky solution. I'm working (slowly) on an alternative that includes more info.
mlm1<-lmer(Your Equation Here)
outmat<-cbind(fixed(mlm1), se.fixef(mlm1))
outmat<-cbind(outmat, se <- sqrt(diag(mixed.1$vcov)))