This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(tidycensus) | |
#install your acs api key | |
#census_api_key(YOUR_KEY, install=T) | |
pops <- get_acs(geography = "county", | |
variables = c("B19013_001", | |
"B01002_001", | |
"B01003_001","B01001_002", #sex, male | |
"B01001A_001", #swhite | |
"B15003_001","B15003_017",#education, HS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BenchmarkTools | |
using Optim, NLSolversBase | |
function datagen(n=5500,k=13) | |
b = rand(k) | |
l = rand(2) | |
x = randn(n,k) | |
abil = randn(n,1) | |
vabil = randn(n,1) | |
sector = 1.0.*(rand(n,1).>0.8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Install build dependencies | |
sudo dnf groupinstall "Development tools" | |
sudo dnf install mpfr-devel gmp-devel libmpc-devel zlib-devel glibc-devel.i686 glibc-devel | |
wget http://mirror2.babylon.network/gcc/releases/gcc-4.7.4/gcc-4.7.4.tar.bz2 | |
tar xvfj gcc-4.7.4.tar.bz2 | |
cd gcc-4.7.4 |